Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
![]() |
Data Structures | |
struct | bflb_uart_ir_config_s |
struct | bflb_uart_config_s |
UART configuration structure. More... | |
Macros | |
#define | UART_AUTO_BAUD_START 0 |
#define | UART_AUTO_BAUD_0X55 1 |
Functions | |
void | bflb_uart_init (struct bflb_device_s *dev, const struct bflb_uart_config_s *config) |
Initialize uart. More... | |
void | bflb_uart_deinit (struct bflb_device_s *dev) |
Deinitialize uart. More... | |
void | bflb_uart_enable (struct bflb_device_s *dev) |
Enable uart. More... | |
void | bflb_uart_disable (struct bflb_device_s *dev) |
Disable uart. More... | |
void | bflb_uart_link_txdma (struct bflb_device_s *dev, bool enable) |
Enable uart tx dma. More... | |
void | bflb_uart_link_rxdma (struct bflb_device_s *dev, bool enable) |
Enable uart rx dma. More... | |
int | bflb_uart_putchar (struct bflb_device_s *dev, int ch) |
Put one char on uart. More... | |
int | bflb_uart_getchar (struct bflb_device_s *dev) |
Get char from uart. More... | |
int | bflb_uart_put (struct bflb_device_s *dev, uint8_t *data, uint32_t len) |
Put a block of data on uart.This is a poll api. More... | |
int | bflb_uart_put_block (struct bflb_device_s *dev, uint8_t *data, uint32_t len) |
Put a block of data on uart.Block before sending done. More... | |
int | bflb_uart_get (struct bflb_device_s *dev, uint8_t *data, uint32_t len) |
Get a block of data from uart. This is a asynchronous api. More... | |
bool | bflb_uart_txready (struct bflb_device_s *dev) |
Check if there is free space in tx fifo. More... | |
bool | bflb_uart_txempty (struct bflb_device_s *dev) |
Check if there is no data in tx fifo. More... | |
bool | bflb_uart_rxavailable (struct bflb_device_s *dev) |
Check if there is data in rx fifo. More... | |
void | bflb_uart_txint_mask (struct bflb_device_s *dev, bool mask) |
Enable or disable uart tx fifo threhold interrupt. More... | |
void | bflb_uart_rxint_mask (struct bflb_device_s *dev, bool mask) |
Enable or disable uart rx fifo threhold interrupt. More... | |
void | bflb_uart_errint_mask (struct bflb_device_s *dev, bool mask) |
Enable or disable uart error interrupt. More... | |
uint32_t | bflb_uart_get_intstatus (struct bflb_device_s *dev) |
Get uart interrupt status. More... | |
void | bflb_uart_int_clear (struct bflb_device_s *dev, uint32_t int_clear) |
Clear uart interrupt status. More... | |
int | bflb_uart_feature_control (struct bflb_device_s *dev, int cmd, size_t arg) |
Control uart feature. More... | |
#define UART_AUTO_BAUD_0X55 1 |
Definition at line 162 of file bflb_uart.h.
#define UART_AUTO_BAUD_START 0 |
Definition at line 161 of file bflb_uart.h.
void bflb_uart_deinit | ( | struct bflb_device_s * | dev | ) |
Deinitialize uart.
[in] | dev | device handle |
void bflb_uart_disable | ( | struct bflb_device_s * | dev | ) |
Disable uart.
[in] | dev | device handle |
void bflb_uart_enable | ( | struct bflb_device_s * | dev | ) |
Enable uart.
[in] | dev | device handle |
void bflb_uart_errint_mask | ( | struct bflb_device_s * | dev, |
bool | mask | ||
) |
Enable or disable uart error interrupt.
[in] | dev | device handle |
[in] | mask | true means disable, false means enable |
int bflb_uart_feature_control | ( | struct bflb_device_s * | dev, |
int | cmd, | ||
size_t | arg | ||
) |
Control uart feature.
[in] | dev | device handle |
[in] | cmd | feature command, use uart feature control cmd definition |
[in] | arg | user data |
int bflb_uart_get | ( | struct bflb_device_s * | dev, |
uint8_t * | data, | ||
uint32_t | len | ||
) |
Get a block of data from uart. This is a asynchronous api.
[in] | dev | device handle |
[in] | data | pointer to save received data |
[in] | len | max length wants to receive |
uint32_t bflb_uart_get_intstatus | ( | struct bflb_device_s * | dev | ) |
Get uart interrupt status.
[in] | dev | device handle |
int bflb_uart_getchar | ( | struct bflb_device_s * | dev | ) |
Get char from uart.
[in] | dev | device handle |
void bflb_uart_init | ( | struct bflb_device_s * | dev, |
const struct bflb_uart_config_s * | config | ||
) |
Initialize uart.
[in] | dev | device handle |
[in] | config | pointer to save uart config |
void bflb_uart_int_clear | ( | struct bflb_device_s * | dev, |
uint32_t | int_clear | ||
) |
Clear uart interrupt status.
[in] | dev | device handle |
[in] | int_clear | clear value, use uart interrupt clear definition |
void bflb_uart_link_rxdma | ( | struct bflb_device_s * | dev, |
bool | enable | ||
) |
Enable uart rx dma.
[in] | dev | device handle |
[in] | enable | true means enable, otherwise disable. |
void bflb_uart_link_txdma | ( | struct bflb_device_s * | dev, |
bool | enable | ||
) |
Enable uart tx dma.
[in] | dev | device handle |
[in] | enable | true means enable, otherwise disable. |
int bflb_uart_put | ( | struct bflb_device_s * | dev, |
uint8_t * | data, | ||
uint32_t | len | ||
) |
Put a block of data on uart.This is a poll api.
[in] | dev | device handle |
[in] | data | pointer to save send data |
[in] | len | length to send |
int bflb_uart_put_block | ( | struct bflb_device_s * | dev, |
uint8_t * | data, | ||
uint32_t | len | ||
) |
Put a block of data on uart.Block before sending done.
[in] | dev | device handle |
[in] | data | pointer to save send data |
[in] | len | length to send |
int bflb_uart_putchar | ( | struct bflb_device_s * | dev, |
int | ch | ||
) |
Put one char on uart.
[in] | dev | device handle |
[in] | ch | char |
bool bflb_uart_rxavailable | ( | struct bflb_device_s * | dev | ) |
Check if there is data in rx fifo.
[in] | dev | device handle |
void bflb_uart_rxint_mask | ( | struct bflb_device_s * | dev, |
bool | mask | ||
) |
Enable or disable uart rx fifo threhold interrupt.
[in] | dev | device handle |
[in] | mask | true means disable, false means enable |
bool bflb_uart_txempty | ( | struct bflb_device_s * | dev | ) |
Check if there is no data in tx fifo.
[in] | dev | device handle |
void bflb_uart_txint_mask | ( | struct bflb_device_s * | dev, |
bool | mask | ||
) |
Enable or disable uart tx fifo threhold interrupt.
[in] | dev | device handle |
[in] | mask | true means disable, false means enable |
bool bflb_uart_txready | ( | struct bflb_device_s * | dev | ) |
Check if there is free space in tx fifo.
[in] | dev | device handle |