mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
drivers/ioexpander/tca64xx.c: Fix some errors in the TCA64XX driver.
This commit is contained in:
committed by
Gregory Nutt
parent
9d89fcadf3
commit
dbfad69248
@@ -257,7 +257,7 @@ static uint8_t tca64_ngpios(FAR struct tca64_dev_s *priv)
|
|||||||
static uint8_t tca64_input_reg(FAR struct tca64_dev_s *priv, uint8_t pin)
|
static uint8_t tca64_input_reg(FAR struct tca64_dev_s *priv, uint8_t pin)
|
||||||
{
|
{
|
||||||
FAR const struct tca64_part_s *part = tca64_getpart(priv);
|
FAR const struct tca64_part_s *part = tca64_getpart(priv);
|
||||||
uint8_t reg = part->tp_output;
|
uint8_t reg = part->tp_input;
|
||||||
|
|
||||||
DEBUGASSERT(pin <= part->tp_ngpios);
|
DEBUGASSERT(pin <= part->tp_ngpios);
|
||||||
return reg + (pin >> 3);
|
return reg + (pin >> 3);
|
||||||
@@ -996,7 +996,6 @@ static FAR void *tca64_attach(FAR struct ioexpander_dev_s *dev,
|
|||||||
tca64_unlock(priv);
|
tca64_unlock(priv);
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: tca64_detach
|
* Name: tca64_detach
|
||||||
@@ -1028,6 +1027,7 @@ static int tca64_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle)
|
|||||||
cb->cbarg = NULL;
|
cb->cbarg = NULL;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: tca64_int_update
|
* Name: tca64_int_update
|
||||||
|
|||||||
Reference in New Issue
Block a user