allow input preload and state toggling

This commit is contained in:
Siwat Sirichai 2024-06-21 21:34:51 +07:00
parent b778fb6a02
commit 4ea2122f6e
5 changed files with 26 additions and 1 deletions

View file

@ -310,4 +310,16 @@ void DigitalInputCard::loadPinMap(uint8_t pinMap[16])
uint8_t DigitalInputCard::getType()
{
return CARD_TYPE_DIGITAL_INPUT;
}
/**
* @brief Preload the previous input buffer and the input buffer
*
* @note This function is useful if you want to preload the input buffers with a run-time value
*/
void DigitalInputCard::preloadInputBuffer() {
refreshInputBankA();
refreshInputBankB();
previousInputBufferA = inputBufferA;
previousInputBufferB = inputBufferB;
}