DigitalIO driver with dynamic channel count

This commit is contained in:
Emanuele Trabattoni
2025-07-12 13:45:00 +02:00
parent 1955b8cb39
commit ef7b9506b6
8 changed files with 335 additions and 38 deletions

View File

@@ -39,7 +39,7 @@ namespace drivers
uint8_t currState(0);
uint8_t newState(0);
if (ch < OUT_PIN1 || ch > OUT_PIN8)
if (ch < DO1 || ch > DO8)
{
LOG_ERROR("Invalid write to output channel: [%d]", ch);
return false;
@@ -64,7 +64,7 @@ namespace drivers
const bool TCA9554PWR::readOut(const uint8_t ch)
{
uint8_t currState(0);
if (ch < OUT_PIN1 || ch > OUT_PIN8)
if (ch < DO1 || ch > DO8)
{
LOG_ERROR("Invalid read to output channel: [%d]", ch);
return false;