dev/sc16is752: Add set/get EFCR IO controls

This commit is contained in:
Sebastian Huber
2019-06-14 07:41:36 +02:00
parent 6ff1da40c7
commit 2be6ab7f77
2 changed files with 16 additions and 0 deletions

View File

@@ -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;

View File

@@ -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.
* @{