XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
XPointStatic< ROWS, COLS > Class Template Reference

Zero-heap XPoint with a compile-time-sized embedded bit pool. More...

#include <XPoint.h>

Inheritance diagram for XPointStatic< ROWS, COLS >:
XPoint

Public Member Functions

 XPointStatic (RelayType type=RE_NON_LATCHING, uint16_t pdur=0)
 
- Public Member Functions inherited from XPoint
 XPoint (uint8_t rows, uint8_t cols, RelayType type=RE_NON_LATCHING, uint16_t pdur=0)
 Heap-allocating constructor.
 
 XPoint (uint8_t rows, uint8_t cols, uint32_t *pool, RelayType type=RE_NON_LATCHING, uint16_t pdur=0)
 Zero-heap pool constructor.
 
 ~XPoint ()
 Destructor. Frees pool only when built with the heap constructor.
 
 XPoint (const XPoint &)=delete
 
XPointoperator= (const XPoint &)=delete
 
void setDriver (XPointDriver *drv)
 Attach a driver backend. Must be called before begin().
 
void begin ()
 Initialize hardware via drv->begin(). Call once after setDriver().
 
bool connect (uint8_t row, uint8_t col)
 Connect row to column.
 
bool disconnect (uint8_t row, uint8_t col)
 Disconnect row from column.
 
bool setLevel (uint8_t row, uint8_t col, uint16_t level)
 Analog-level connect / disconnect for PWM drivers.
 
void clearAll ()
 Disconnect all nodes, zeroing the state section of the pool.
 
void lockRows (uint8_t rowA, uint8_t rowB)
 Prevent rowA and rowB from sharing a column simultaneously.
 
void exclusiveInput (uint8_t col)
 Mark column col as exclusive: at most one row may connect at a time.
 
void update ()
 Expire latching-relay coil pulses and call releaseNode() as needed.
 

Additional Inherited Members

- Static Public Member Functions inherited from XPoint
static uint16_t poolWords (uint8_t rows, uint8_t cols)
 Number of uint32_t words needed for a pool of the given dimensions.
 

Detailed Description

template<uint8_t ROWS, uint8_t COLS>
class XPointStatic< ROWS, COLS >

Zero-heap XPoint with a compile-time-sized embedded bit pool.

Declare as a global or static local to keep everything in BSS/data.

matrix.setDriver(&myDriver);
matrix.begin();
@ RE_NON_LATCHING
Energize to connect; de-energize to disconnect.
Definition XPoint.h:54
Zero-heap XPoint with a compile-time-sized embedded bit pool.
Definition XPoint.h:229
Template Parameters
ROWSRow count (compile-time constant, 1–255).
COLSColumn count (compile-time constant, 1–255).

Constructor & Destructor Documentation

◆ XPointStatic()

template<uint8_t ROWS, uint8_t COLS>
XPointStatic< ROWS, COLS >::XPointStatic ( RelayType  type = RE_NON_LATCHING,
uint16_t  pdur = 0 
)
inline
Parameters
[in]typeRelay operating mode (default RE_NON_LATCHING).
[in]pdurCoil pulse duration in ms (default 0).

The documentation for this class was generated from the following file: