Macros
Collaboration diagram for Command Codes:

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...
 

Detailed Description

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:

Macro Definition Documentation

§ UART_CMD_PEEK

#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.

§ UART_CMD_ISAVAILABLE

#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.

§ UART_CMD_GETRXCOUNT

#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.

§ UART_CMD_RXENABLE

#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.

§ UART_CMD_RXDISABLE

#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.

Warning
A call to UART_read() does NOT re-enable receive.
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale