![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Modules | |
UART_Registers | |
Registers, Bit Masks and Bit Positions for the UART Peripheral Module. | |
Data Structures | |
struct | uart_cfg_t |
UART configuration type. More... | |
struct | uart_req_t |
Non-blocking UART transaction request. More... | |
Enumerations | |
enum | uart_parity_t { UART_PARITY_DISABLE = 0, UART_PARITY_EVEN_0, UART_PARITY_EVEN_1, UART_PARITY_EVEN = UART_PARITY_EVEN_1, UART_PARITY_ODD_0, UART_PARITY_ODD_1, UART_PARITY_ODD = UART_PARITY_ODD_1, UART_PARITY_MARK_0, UART_PARITY_MARK_1, UART_PARITY_MARK = UART_PARITY_MARK_1, UART_PARITY_SPACE_0, UART_PARITY_SPACE_1, UART_PARITY_SPACE = UART_PARITY_SPACE_1 } |
Parity settings type. More... | |
enum | uart_size_t { UART_DATA_SIZE_5_BITS = MXC_S_UART_CTRL_CHAR_SIZE_5, UART_DATA_SIZE_6_BITS = MXC_S_UART_CTRL_CHAR_SIZE_6, UART_DATA_SIZE_7_BITS = MXC_S_UART_CTRL_CHAR_SIZE_7, UART_DATA_SIZE_8_BITS = MXC_S_UART_CTRL_CHAR_SIZE_8 } |
Message size settings. More... | |
enum | uart_stop_t { UART_STOP_1 = 0, UART_STOP_1P5 = MXC_F_UART_CTRL_STOPBITS, UART_STOP_2 = MXC_F_UART_CTRL_STOPBITS } |
Stop bit settings. More... | |
enum | uart_flow_ctrl_t { UART_FLOW_CTRL_DIS = 0, UART_FLOW_CTRL_EN = MXC_F_UART_CTRL_FLOW_CTRL } |
Flow control. More... | |
enum | uart_flow_pol_t { UART_FLOW_POL_DIS = 0, UART_FLOW_POL_EN = MXC_F_UART_CTRL_FLOW_POL } |
Flow control Polarity. More... | |
enum | uart_clksel_t { UART_CLKSEL_SYSTEM = 0, UART_CLKSEL_ALTERNATE = MXC_F_UART_CTRL_CLKSEL } |
Clock Source Select. More... | |
Functions | |
int | UART_Init (mxc_uart_regs_t *uart, const uart_cfg_t *cfg, const sys_cfg_uart_t *sys_cfg) |
Initialize and enable UART module. More... | |
int | UART_Shutdown (mxc_uart_regs_t *uart) |
Shutdown UART module. More... | |
void | UART_Handler (mxc_uart_regs_t *uart) |
UART interrupt handler. More... | |
int | UART_Read (mxc_uart_regs_t *uart, uint8_t *data, int len, int *num) |
Read UART data, blocking until transaction is complete. More... | |
int | UART_Write (mxc_uart_regs_t *uart, const uint8_t *data, int len) |
Write UART data. More... | |
int | UART_ReadAsync (mxc_uart_regs_t *uart, uart_req_t *req) |
Asynchronously read UART data. More... | |
int | UART_WriteAsync (mxc_uart_regs_t *uart, uart_req_t *req) |
Asynchronously write/transmit UART data. More... | |
uint8_t | UART_ReadByte (mxc_uart_regs_t *uart) |
Read a single byte from the UART. More... | |
void | UART_WriteByte (mxc_uart_regs_t *uart, uint8_t data) |
Write one byte at a time to the UART. More... | |
int | UART_Busy (mxc_uart_regs_t *uart) |
Check to see if the UART is busy. More... | |
int | UART_PrepForSleep (mxc_uart_regs_t *uart) |
Prepare the UART for entry into a Low-Power mode (DEEPSLEEP/BACKUP). More... | |
int | UART_AbortAsync (uart_req_t *req) |
Abort asynchronous request. More... | |
unsigned | UART_NumWriteAvail (mxc_uart_regs_t *uart) |
Returns the number of bytes still pending transmission in the UART TX FIFO. More... | |
unsigned | UART_NumReadAvail (mxc_uart_regs_t *uart) |
Returns the number of bytes available to be read from the RX FIFO. More... | |
void | UART_ClearFlags (mxc_uart_regs_t *uart, uint32_t mask) |
Clears the specified interrupt flags. More... | |
unsigned | UART_GetFlags (mxc_uart_regs_t *uart) |
Get the UART interrupt flags. More... | |
void | UART_Disable (mxc_uart_regs_t *uart) |
Disable the UART. More... | |
void | UART_Enable (mxc_uart_regs_t *uart) |
Enables the UART. More... | |
void | UART_DrainRX (mxc_uart_regs_t *uart) |
Drains/empties and data in the RX FIFO, discarding any bytes not yet consumed. More... | |
void | UART_DrainTX (mxc_uart_regs_t *uart) |
Drains/empties any data in the TX FIFO, discarding any bytes not yet transmitted. More... | |
int | SYS_UART_Shutdown (mxc_uart_regs_t *uart) |
System level shutdown for UART module. More... | |
enum uart_parity_t |
enum uart_size_t |
enum uart_stop_t |
enum uart_flow_ctrl_t |
enum uart_flow_pol_t |
enum uart_clksel_t |
int UART_Init | ( | mxc_uart_regs_t * | uart, |
const uart_cfg_t * | cfg, | ||
const sys_cfg_uart_t * | sys_cfg | ||
) |
uart | Pointer to the UART registers. |
cfg | Pointer to UART configuration. |
sys_cfg | Pointer to system configuration object |
int UART_Shutdown | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_Handler | ( | mxc_uart_regs_t * | uart | ) |
This function should be called by the application from the interrupt handler if UART interrupts are enabled. Alternately, this function can be periodically called by the application if UART interrupts are disabled. It is only necessary to call this when using asynchronous functions.
uart | Pointer to the UART registers. |
int UART_Read | ( | mxc_uart_regs_t * | uart, |
uint8_t * | data, | ||
int | len, | ||
int * | num | ||
) |
uart | Pointer to the UART registers. |
data | Pointer to buffer to save the data read. |
len | Number of bytes to read. |
num | Pointer to store the number of bytes actually read, pass NULL if not needed. |
int UART_Write | ( | mxc_uart_regs_t * | uart, |
const uint8_t * | data, | ||
int | len | ||
) |
This function blocks until the write transaction is complete.
uart | Pointer to the UART registers. |
data | Pointer to buffer for write data. |
len | Number of bytes to write. |
int UART_ReadAsync | ( | mxc_uart_regs_t * | uart, |
uart_req_t * | req | ||
) |
uart | Pointer to the UART registers. |
req | Pointer to request for a UART transaction, see uart_req. |
int UART_WriteAsync | ( | mxc_uart_regs_t * | uart, |
uart_req_t * | req | ||
) |
uart | Pointer to the UART registers. |
req | Request for a UART transaction, see uart_req. |
uint8_t UART_ReadByte | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_WriteByte | ( | mxc_uart_regs_t * | uart, |
uint8_t | data | ||
) |
uart | Pointer to the UART registers. |
data | The byte to write. |
int UART_Busy | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
int UART_PrepForSleep | ( | mxc_uart_regs_t * | uart | ) |
Checks for any ongoing transactions. Disables interrupts if the UART is idle.
uart | Pointer to the UART registers. |
int UART_AbortAsync | ( | uart_req_t * | req | ) |
req | Pointer to the request to abort. See uart_req. |
unsigned UART_NumWriteAvail | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
unsigned UART_NumReadAvail | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_ClearFlags | ( | mxc_uart_regs_t * | uart, |
uint32_t | mask | ||
) |
uart | Pointer to the UART registers. |
mask | Mask of the UART interrupts to clear, see UART_INT_FL Register. |
unsigned UART_GetFlags | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_Disable | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_Enable | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_DrainRX | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
void UART_DrainTX | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to the UART registers. |
int SYS_UART_Shutdown | ( | mxc_uart_regs_t * | uart | ) |
uart | Pointer to UART module registers |