allow input preload and state toggling
This commit is contained in:
parent
b778fb6a02
commit
4ea2122f6e
5 changed files with 26 additions and 1 deletions
|
@ -306,4 +306,13 @@ void DigitalOutputCard::saveStateToFRAM() {
|
|||
if(!framBinded) return;
|
||||
uint16_t packed = packStates();
|
||||
this->fram->write16(framAddress, packed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Toggle the state of the specified pin
|
||||
*
|
||||
* @param pin The pin to toggle
|
||||
*/
|
||||
void DigitalOutputCard::toggleState(uint8_t pin) {
|
||||
this->setState(pin, !this->state_buffer[pin]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue