Macros | |
#define | UART_CMD_PEEK (0) |
Command code used by UART_control() to read the next unsigned char. More... | |
#define | UART_CMD_ISAVAILABLE (1) |
Command code used by UART_control() to determine if the read buffer is empty. More... | |
#define | UART_CMD_GETRXCOUNT (2) |
Command code used by UART_control() to determine how many unsigned chars are in the read buffer. More... | |
#define | UART_CMD_RXENABLE (3) |
Command code used by UART_control() to enable data receive by the UART. More... | |
#define | UART_CMD_RXDISABLE (4) |
Command code used by UART_control() to disable data received by the UART. More... | |
UART_CMD_* macros are general command codes for UART_control(). Not all UART driver implementations support these command codes.
UARTMSP432_CMD_* macros are command codes only defined in the UARTMSP432.h driver implementation and need to:
#define UART_CMD_PEEK (0) |
Command code used by UART_control() to read the next unsigned char.
This command is used to read the next unsigned char from the UART's circular buffer without removing it. With this command code, arg is a pointer to an integer. *arg contains the next unsigned
char
read if data is present, else *arg is set to UART_STATUS_ERROR.
#define UART_CMD_ISAVAILABLE (1) |
Command code used by UART_control() to determine if the read buffer is empty.
This command is used to determine if there are any unsigned chars available to read from the UART's circular buffer using UART_read(). With this command code, arg is a pointer to a bool
. *arg contains true
if data is available, else false
.
#define UART_CMD_GETRXCOUNT (2) |
Command code used by UART_control() to determine how many unsigned chars are in the read buffer.
This command is used to determine how many unsigned
chars
are available to read from the UART's circular buffer using UART_read(). With this command code, arg is a pointer to an integer. *arg contains the number of unsigned
chars
available to read.
#define UART_CMD_RXENABLE (3) |
Command code used by UART_control() to enable data receive by the UART.
This command is used to enable the UART in such a way that it stores received unsigned chars into the circular buffer. For drivers that support power management, this typically means that the UART will set a power constraint while receive is enabled. UART_open() will always have this option enabled. With this command code, arg is don't care.
#define UART_CMD_RXDISABLE (4) |
Command code used by UART_control() to disable data received by the UART.
This command is used to disable the UART in such a way that ignores the data it receives. For drivers that support power management, this typically means that the driver will release any power constraints, to permit the system to enter low power modes. With this command code, arg is don't care.