Low level interface for WAPS. Used for transmitting and receiving data via UART.
Definition in file waps_uart.h.
Go to the source code of this file.
|
bool | Waps_uart_init (new_frame_cb_f frame_cb, uint32_t baud, bool flow_ctrl, void *tx_buffer, void *rx_buffer) |
| WAPS UART initialize, after this, WAPS UART is ready to transmit and receive serial data.
|
|
void | Waps_uart_powerReset (void) |
| Power config. Disable UART auto-powering on Sinks and LL Nodes.
|
|
bool | Waps_uart_send (const void *buffer, uint32_t size) |
| WAPS UART send, send a block of data via serial port Automatically applies SLIP encoding to data and appends CRC.
|
|
void | Waps_uart_flush (void) |
| Flush UART module TX buffer. Waits for operation (pend) to complete before returning.
|
|
void | Waps_uart_setIrq (bool state) |
| Set indication that something is pending.
|
|
void | Waps_uart_AutoPowerOn (void) |
| Enable automatic RX power.
|
|
void | Waps_uart_AutoPowerOff (void) |
| Disable automatic RX power.
|
|
void | Waps_uart_keepPowerOn (void) |
| Keep power on (receiver is receiving)
|
|
void | Waps_uart_powerOff (void) |
| Grafecully power down UART, if autopower-feature is used.
|
|
uint32_t | Waps_uart_powerExec (void) |
| Callback task for power manager.
|
|
void | Waps_uart_clean (void) |
| Clean waps from old data.
|
|
◆ Waps_uart_AutoPowerOff()
void Waps_uart_AutoPowerOff |
( |
void |
| ) |
|
Disable automatic RX power.
◆ Waps_uart_AutoPowerOn()
void Waps_uart_AutoPowerOn |
( |
void |
| ) |
|
Enable automatic RX power.
◆ Waps_uart_clean()
void Waps_uart_clean |
( |
void |
| ) |
|
Clean waps from old data.
◆ Waps_uart_flush()
void Waps_uart_flush |
( |
void |
| ) |
|
Flush UART module TX buffer. Waits for operation (pend) to complete before returning.
◆ Waps_uart_init()
bool Waps_uart_init |
( |
new_frame_cb_f |
frame_cb, |
|
|
uint32_t |
baud, |
|
|
bool |
flow_ctrl, |
|
|
void * |
tx_buffer, |
|
|
void * |
rx_buffer |
|
) |
| |
WAPS UART initialize, after this, WAPS UART is ready to transmit and receive serial data.
- Parameters
-
frame_cb | Mandatory callback for upper layer notification about a valid looking frame |
baud | Baudrate for communication |
flow_ctrl | Is flow control to be used or not |
tx_buffer | Memory block for transmissions |
rx_buffer | Memory block for receptions |
- Returns
- True if successful, false otherwise
◆ Waps_uart_keepPowerOn()
void Waps_uart_keepPowerOn |
( |
void |
| ) |
|
Keep power on (receiver is receiving)
◆ Waps_uart_powerExec()
uint32_t Waps_uart_powerExec |
( |
void |
| ) |
|
Callback task for power manager.
◆ Waps_uart_powerOff()
void Waps_uart_powerOff |
( |
void |
| ) |
|
Grafecully power down UART, if autopower-feature is used.
◆ Waps_uart_powerReset()
void Waps_uart_powerReset |
( |
void |
| ) |
|
Power config. Disable UART auto-powering on Sinks and LL Nodes.
◆ Waps_uart_send()
bool Waps_uart_send |
( |
const void * |
buffer, |
|
|
uint32_t |
size |
|
) |
| |
WAPS UART send, send a block of data via serial port Automatically applies SLIP encoding to data and appends CRC.
- Parameters
-
buffer | Pointer to memory block for transmit |
size | Amount of data in bytes to send |
◆ Waps_uart_setIrq()
void Waps_uart_setIrq |
( |
bool |
state | ) |
|
Set indication that something is pending.
- Parameters
-
state | True means that something is pending, false that queues are empty |
- Note
- This reflects only the WAPS frame buffers state, IRQ pin state is finally determined by the SPI interface itself