diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2018-02-09 08:59:27 +0100 |
---|---|---|
committer | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2018-02-12 14:36:23 +0100 |
commit | bf7070232fe2b26de0375bc7517213e655ce9e5d (patch) | |
tree | ce2fe42cccc667e2c1dcc86a360e29af20bbde6d /cpukit/include/dev | |
parent | bsp/atsam: Fix cache / DMA handling in SPI. (diff) | |
download | rtems-bf7070232fe2b26de0375bc7517213e655ce9e5d.tar.bz2 |
dev/sc16is752: Add GPIO access via ioctl.
Diffstat (limited to 'cpukit/include/dev')
-rw-r--r-- | cpukit/include/dev/serial/sc16is752.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cpukit/include/dev/serial/sc16is752.h b/cpukit/include/dev/serial/sc16is752.h index 7e5b47aaa2..67c2e009bc 100644 --- a/cpukit/include/dev/serial/sc16is752.h +++ b/cpukit/include/dev/serial/sc16is752.h @@ -251,10 +251,55 @@ rtems_status_code sc16is752_spi_create( #define SC16IS752_SET_SLEEP_MODE _IOW('d', 0, int) /** + * @brief Set the I/O Control bits except for the SRESET. + * + * Note that it will not be possible to set the SRESET. Otherwise the driver + * might would have an undefined state. + */ +#define SC16IS752_SET_IOCONTROL _IOW('d', 1, uint8_t) + +/** + * @brief Set the I/O pins direction register. + */ +#define SC16IS752_SET_IODIR _IOW('d', 2, uint8_t) + +/** + * @brief Set the I/O pins state register. + */ +#define SC16IS752_SET_IOSTATE _IOW('d', 3, uint8_t) + +/** * @brief Returns non-zero in case the sleep mode is enabled, otherwise zero. */ #define SC16IS752_GET_SLEEP_MODE _IOR('d', 0, int) +/** + * @brief Read the I/O Control register. + */ +#define SC16IS752_GET_IOCONTROL _IOR('d', 1, uint8_t) + +/** + * @brief Read the I/O pins direction register. + */ +#define SC16IS752_GET_IODIR _IOR('d', 2, uint8_t) + +/** + * @brief Read the I/O pins state register. + */ +#define SC16IS752_GET_IOSTATE _IOR('d', 3, uint8_t) + +/** + * @brief Bits for the IOCONTROL register. + * @{ + */ +#define SC16IS752_IOCONTROL_SRESET (1u << 3) +#define SC16IS752_IOCONTROL_GPIO_3_0_OR_MODEM (1u << 2) +#define SC16IS752_IOCONTROL_GPIO_7_4_OR_MODEM (1u << 1) +#define SC16IS752_IOCONTROL_IOLATCH (1u << 0) +/** + * @} + */ + #ifdef __cplusplus } #endif /* __cplusplus */ |