|
XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
|
Abstract base class for all XPoint hardware drivers. More...
#include <XPointDriver.h>
Public Member Functions | |
| virtual | ~XPointDriver () |
| virtual void | begin ()=0 |
| Initialize hardware: pin modes, bus setup, initial output state. | |
| virtual void | setNodeHardware (uint8_t r, uint8_t c, bool state)=0 |
| Drive one matrix node on or off. | |
| virtual void | setNodeLevel (uint8_t r, uint8_t c, uint16_t level) |
| Set an analog drive level for node (r, c). | |
| virtual void | releaseNode (uint8_t, uint8_t) |
| De-energize the coil that was pulsed on node (r, c). | |
| virtual void | commitPhysicalUpdates () |
| Flush buffered state to hardware. | |
Abstract base class for all XPoint hardware drivers.
XPoint holds a pointer to an XPointDriver and calls its methods to translate logical connect / disconnect / level requests into hardware operations.
|
inlinevirtual |
|
pure virtual |
Initialize hardware: pin modes, bus setup, initial output state.
Called once by XPoint::begin(). Must be overridden.
Implemented in ArduinoDirectGPIODriver, ArduinoShiftRegisterDriver, DirectGPIODriver, MCP23017Driver, ShiftRegisterDriver, and TLC59711Driver.
|
inlinevirtual |
Flush buffered state to hardware.
Called by XPoint after every setNodeHardware(), setNodeLevel(), and releaseNode() call. Drivers that batch writes (shift registers, SPI) must override this to clock out / transmit buffered data. Direct-write drivers (GPIO, I2C) can leave this as the default no-op.
Reimplemented in ArduinoDirectGPIODriver, ArduinoShiftRegisterDriver, DirectGPIODriver, MCP23017Driver, ShiftRegisterDriver, and TLC59711Driver.
|
inlinevirtual |
De-energize the coil that was pulsed on node (r, c).
Called automatically by XPoint::update() once pulseDuration ms have elapsed since the coil was activated. Non-latching drivers can leave this as the default no-op.
| [in] | r | Row index. |
| [in] | c | Column index. |
|
pure virtual |
Drive one matrix node on or off.
state true = energize, false = de-energize.state true = pulse SET coil, false = pulse RESET coil.| [in] | r | Row index (zero-based). |
| [in] | c | Column index (zero-based). |
| [in] | state | true to activate the node, false to deactivate. |
Implemented in ArduinoDirectGPIODriver, ArduinoShiftRegisterDriver, DirectGPIODriver, MCP23017Driver, ShiftRegisterDriver, and TLC59711Driver.
|
inlinevirtual |
Set an analog drive level for node (r, c).
Range: 0x0000 (off) to 0xFFFF (full on). The default implementation delegates to setNodeHardware(level > 0) so binary drivers work unchanged without overriding this method. Override in PWM-capable drivers (TLC59711, PCA9685) to set a fractional output for brightness control or hold-current reduction.
| [in] | r | Row index. |
| [in] | c | Column index. |
| [in] | level | PWM level 0x0000–0xFFFF. |
Reimplemented in TLC59711Driver.