|
XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
|
Utilities for 74HC595 daisy-chain index computation. More...
Functions | |
| uint16_t | rowMajorIndex (uint8_t row, uint8_t col, uint8_t cols) |
| Compute the row-major bit index for node (row, col). | |
Utilities for 74HC595 daisy-chain index computation.
|
inline |
Compute the row-major bit index for node (row, col).
Maps a 2-D matrix position to a flat bit index for a 74HC595 chain wired in row-major order (row 0 bits first, then row 1, etc.).
| [in] | row | Row index (zero-based). |
| [in] | col | Column index (zero-based). |
| [in] | cols | Total number of columns in the matrix. |
row * cols + col.