From 2be6ab7f77bdf61cc1d3fa33e8772f880384bbb3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 14 Jun 2019 07:41:36 +0200 Subject: dev/sc16is752: Add set/get EFCR IO controls --- cpukit/dev/serial/sc16is752.c | 6 ++++++ cpukit/include/dev/serial/sc16is752.h | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/cpukit/dev/serial/sc16is752.c b/cpukit/dev/serial/sc16is752.c index 5384563abe..9b6f6eb6e1 100644 --- a/cpukit/dev/serial/sc16is752.c +++ b/cpukit/dev/serial/sc16is752.c @@ -400,6 +400,12 @@ static int sc16is752_ioctl( case SC16IS752_GET_IOSTATE: read_reg(ctx, SC16IS752_IOSTATE, (uint8_t *)buffer, 1); break; + case SC16IS752_SET_EFCR: + write_reg(ctx, SC16IS752_EFCR, (uint8_t *)buffer, 1); + break; + case SC16IS752_GET_EFCR: + read_reg(ctx, SC16IS752_EFCR, (uint8_t *)buffer, 1); + break; case TIOCMGET: sc16is752_get_modem_bits(ctx, (int *)buffer); break; diff --git a/cpukit/include/dev/serial/sc16is752.h b/cpukit/include/dev/serial/sc16is752.h index ea8ba7056b..ff9f4b02e7 100644 --- a/cpukit/include/dev/serial/sc16is752.h +++ b/cpukit/include/dev/serial/sc16is752.h @@ -279,6 +279,11 @@ rtems_status_code sc16is752_spi_create( */ #define SC16IS752_SET_IOSTATE _IOW('d', 3, uint8_t) +/** + * @brief Set the EFCR register. + */ +#define SC16IS752_SET_EFCR _IOW('d', 4, uint8_t) + /** * @brief Returns non-zero in case the sleep mode is enabled, otherwise zero. */ @@ -299,6 +304,11 @@ rtems_status_code sc16is752_spi_create( */ #define SC16IS752_GET_IOSTATE _IOR('d', 3, uint8_t) +/** + * @brief Read the EFCR register. + */ +#define SC16IS752_GET_EFCR _IOR('d', 4, uint8_t) + /** * @brief Bits for the IOCONTROL register. * @{ -- cgit v1.2.3