-
Notifications
You must be signed in to change notification settings - Fork 0
UART Structures
This page contains information about the structures used within the UART configuration and modification. Please refer to the list below to be redirected to the appropriate documentation.
Definition
typedef struct UART_DATA {
Queue Rx_queue;
Queue Tx_queue;
boolean Tx_is_idle;
} UART_Data;
Description
The UART_Data
structure is used as an internal reference structure. It is handed back by the initialization function, but it should not be modified by the user in any way. The purpose of this structure is to query the current status of the UART. If this structure is modified, the UART could potentially malfunction.
Parameters
- Rx_queue: This parameter is the receive buffer for the UART
- Tx_queue: This parameter is the transmission buffer for the UART
- Tx_is_idle: This parameter specifies whether the UART is currently transmitting or not
Definition
typedef struct UART_CONFIG {
uint speed;
uint pb_clk;
UART_Channel which_uart;
uint8 *rx_buffer_ptr;
uint rx_buffer_size;
uint8 *tx_buffer_ptr;
uint tx_buffer_size;
void (*rx_callback);
void (*tx_callback);
boolean tx_en;
boolean rx_en;
} UART_Config;
Description
The UART_Config
structure is used for UART configuration. This structure should be completely populated when configuring the UART for proper functionality.
Parameters
- speed: This is the desired baud rate that the user would like the UART to run at.
- pb_clk: This parameter is a speed that the peripheral bus clock is running at. This is used to properly set the UART baud rate.
SUBLIBinal was created by the Palouse Robosub Club.