XPoint
0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
HC595Helper.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: AGPL-3.0-only
2
// Copyright (c) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
3
// https://github.com/dstroy0/XPoint
4
20
#ifndef HC595_HELPER_H
21
#define HC595_HELPER_H
22
23
#include <stdint.h>
24
28
namespace
HC595Helper
29
{
30
42
inline
uint16_t
rowMajorIndex
(uint8_t row, uint8_t col, uint8_t cols)
43
{
44
return
(uint16_t)(row * cols + col);
45
}
46
47
}
// namespace HC595Helper
48
49
#endif
// HC595_HELPER_H
HC595Helper
Utilities for 74HC595 daisy-chain index computation.
Definition
HC595Helper.h:29
HC595Helper::rowMajorIndex
uint16_t rowMajorIndex(uint8_t row, uint8_t col, uint8_t cols)
Compute the row-major bit index for node (row, col).
Definition
HC595Helper.h:42
src
drivers
HC595Helper.h
Generated by
1.9.8