Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
Functions | |
uint8_t | simple_uart_get (void) |
Function for reading a character from UART. Execution is blocked until UART peripheral detects character has been received. More... | |
bool | simple_uart_get_with_timeout (int32_t timeout_ms, uint8_t *rx_data) |
Function for reading a character from UART with timeout on how long to wait for the byte to be received. Execution is blocked until UART peripheral detects character has been received or until the timeout expires, which even occurs first. More... | |
void | simple_uart_put (uint8_t cr) |
Function for sending a character to UART. Execution is blocked until UART peripheral reports character to have been send. More... | |
void | simple_uart_putstring (const uint8_t *str) |
Function for sending a string to UART. Execution is blocked until UART peripheral reports all characters to have been send. Maximum string length is 254 characters including null character in the end. More... | |
void | simple_uart_config (uint32_t baudrate, uint8_t rts_pin_number, uint8_t txd_pin_number, uint8_t cts_pin_number, uint8_t rxd_pin_number, bool hwfc) |
UART configuration. More... | |
uint8_t simple_uart_get | ( | void | ) |
Function for reading a character from UART. Execution is blocked until UART peripheral detects character has been received.
Definition at line 22 of file simple_uart.c.
bool simple_uart_get_with_timeout | ( | int32_t | timeout_ms, |
uint8_t * | rx_data | ||
) |
Function for reading a character from UART with timeout on how long to wait for the byte to be received. Execution is blocked until UART peripheral detects character has been received or until the timeout expires, which even occurs first.
timeout_ms | maximum time to wait for the data. |
rx_data | pointer to the memory where the received data is stored. |
Definition at line 34 of file simple_uart.c.
void simple_uart_put | ( | uint8_t | cr | ) |
Function for sending a character to UART. Execution is blocked until UART peripheral reports character to have been send.
cr | Character to send. |
Definition at line 62 of file simple_uart.c.
void simple_uart_putstring | ( | const uint8_t * | str | ) |
Function for sending a string to UART. Execution is blocked until UART peripheral reports all characters to have been send. Maximum string length is 254 characters including null character in the end.
str | Null terminated string to send. |
Definition at line 75 of file simple_uart.c.
void simple_uart_config | ( | uint32_t | baudrate, |
uint8_t | rts_pin_number, | ||
uint8_t | txd_pin_number, | ||
uint8_t | cts_pin_number, | ||
uint8_t | rxd_pin_number, | ||
bool | hwfc | ||
) |
UART configuration.
baudrate | Baudrate to use. |
rts_pin_number | Chip pin number to be used for UART RTS |
txd_pin_number | Chip pin number to be used for UART TXD |
cts_pin_number | Chip pin number to be used for UART CTS |
rxd_pin_number | Chip pin number to be used for UART RXD |
hwfc | Enable hardware flow control |
Definition at line 87 of file simple_uart.c.