mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
ioexpander/iso1i813t: add option to check errors during read
This commit adds the possibility to check for expander errors when reading the data. This is optional if glerr_check or interr_check fields in configuration are not zero. If not zero, read operation also reads ISO1I813T_GLERR and ISO1I813T_INTERR register and returns error if there is some error. The user can control which errors he wants to check with glerr_check and interr_check masks. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
committed by
Alan C. Assis
parent
cacfb7ebda
commit
600d0e413a
@@ -49,9 +49,17 @@ struct iso1i813t_config_s
|
||||
{
|
||||
/* Device characterization */
|
||||
|
||||
uint8_t id; /* ID if multiple devices used to select correct CS */
|
||||
uint8_t mode; /* SPI mode */
|
||||
uint32_t frequency; /* SPI frequency */
|
||||
uint8_t id; /* ID if multiple devices used to select correct CS */
|
||||
uint8_t mode; /* SPI mode */
|
||||
uint8_t glerr_check; /* Bits that are check in global error register
|
||||
* during read - read operation fails if these are
|
||||
* not zero.
|
||||
*/
|
||||
uint8_t interr_check; /* Bits that are check in internal error register
|
||||
* during read - read operation fails if these are
|
||||
* not zero.
|
||||
*/
|
||||
uint32_t frequency; /* SPI frequency */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user