[rtems commit] dev/sc16is752: Add set/get EFCR IO controls

Sebastian Huber sebh at rtems.org
Fri Jun 14 05:42:24 UTC 2019


Module:    rtems
Branch:    master
Commit:    2be6ab7f77bdf61cc1d3fa33e8772f880384bbb3
Changeset: http://git.rtems.org/rtems/commit/?id=2be6ab7f77bdf61cc1d3fa33e8772f880384bbb3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jun 14 07:41:36 2019 +0200

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 5384563..9b6f6eb 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 ea8ba70..ff9f4b0 100644
--- a/cpukit/include/dev/serial/sc16is752.h
+++ b/cpukit/include/dev/serial/sc16is752.h
@@ -280,6 +280,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.
  */
 #define SC16IS752_GET_SLEEP_MODE _IOR('d', 0, int)
@@ -300,6 +305,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.
  * @{
  */



More information about the vc mailing list