DigitalIO driver with dynamic channel count
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user