This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _bf52x_uart_settings |
Defines | |
#define | BF52X_BAUD_RATE_2400 2400 |
.h Contains declarations for BF52X UART driver. | |
#define | BF52X_BAUD_RATE_4800 4800 |
#define | BF52X_BAUD_RATE_9600 9600 |
#define | BF52X_BAUD_RATE_14400 14400 |
#define | BF52X_BAUD_RATE_19200 19200 |
#define | BF52X_BAUD_RATE_28800 28800 |
#define | BF52X_BAUD_RATE_38400 38400 |
#define | BF52X_BAUD_RATE_57600 57600 |
#define | BF52X_BAUD_RATE_76800 76800 |
#define | BF52X_BAUD_RATE_115200 115200 |
#define | BF52X_BAUD_RATE_230400 230400 |
#define | BF52X_BAUD_RATE_921600 921600 |
#define | BF52X_BAUD_RATE_6250000 6250000 |
Typedefs | |
typedef _bf52x_uart_settings | bf52x_uart_settings |
Functions | |
int | bf52x_uart_init (bf52x_uart_settings *sett) |
Initialize the uart. | |
void | bf52x_uart_deinit (void) |
Deinitialize the uart. | |
int | bf52x_uart_transmit (char *data, unsigned char datalen) |
Transfers the data over uart. | |
int | bf52x_uart_receive (char *data, unsigned char datalen) |
Receives the data over uart. | |
int | bf52x_uart_receiveNb (char *data, unsigned char datalen) |
Receives the data over uart. |
#define BF52X_BAUD_RATE_115200 115200 |
#define BF52X_BAUD_RATE_14400 14400 |
#define BF52X_BAUD_RATE_19200 19200 |
#define BF52X_BAUD_RATE_230400 230400 |
#define BF52X_BAUD_RATE_2400 2400 |
.h Contains declarations for BF52X UART driver.
#define BF52X_BAUD_RATE_28800 28800 |
#define BF52X_BAUD_RATE_38400 38400 |
#define BF52X_BAUD_RATE_4800 4800 |
#define BF52X_BAUD_RATE_57600 57600 |
#define BF52X_BAUD_RATE_6250000 6250000 |
#define BF52X_BAUD_RATE_76800 76800 |
#define BF52X_BAUD_RATE_921600 921600 |
#define BF52X_BAUD_RATE_9600 9600 |
typedef struct _bf52x_uart_settings bf52x_uart_settings |
void bf52x_uart_deinit | ( | void | ) |
Deinitialize the uart.
This function disables the uart by programming the uart global control reg.
Pre-conditions:
Post condtions:
Parameters:
sett | - Holds the baud rate and parity information to be used. |
int bf52x_uart_init | ( | bf52x_uart_settings * | sett | ) |
Initialize the uart.
This function:- 1. Configures the uart to the baud rate mentioned by the application. 2. Configure for 8 bits, 1 stop bit
Pre-conditions:
Post condtions:
Parameters:
sett | - Holds the baud rate and parity information to be used. |
int bf52x_uart_receive | ( | char * | data, | |
unsigned char | datalen | |||
) |
Receives the data over uart.
This function waits for each byte to be received over uart untill data of length datalen is received. The data received is stored in data.
Pre-conditions:
Post condtions:
Parameters:
data | - Pointer to data in which the data will be stored. datalen - Length in bytes to be received. |
int bf52x_uart_receiveNb | ( | char * | data, | |
unsigned char | datalen | |||
) |
Receives the data over uart.
Non blocking receive of serial data. Will return 0 if nothing received.
Pre-conditions:
Post condtions:
Parameters:
data | - Pointer to data in which the data will be stored. datalen - max number of bytes to receive |
int bf52x_uart_transmit | ( | char * | data, | |
unsigned char | datalen | |||
) |
Transfers the data over uart.
This function transfers the data of total datalen bytes in blocking mode.
Pre-conditions:
Post condtions:
Parameters:
data | - Pointer to data to be transmitted. datalen - Length in bytes to be transmitted. |