RIOT adaption-specific definition of the "uart" bsp module. More...
RIOT adaption-specific definition of the "uart" bsp module.
For details on the implementation check pkg/openwsn/doc.txt
Definition in file openwsn_uart.h.
#include "stdint.h"
#include "board.h"
Go to the source code of this file.
Macros | |
#define | STDIO_UART_DEV (UART_DEV(0)) |
UART device to use for STDIO. More... | |
#define | OPENWSN_UART_DEV ((STDIO_UART_DEV + 1) % UART_NUMOF) |
OpenWSN default uart dev. More... | |
#define | OPENWSN_UART_BAUDRATE (115200U) |
OpenWSN uart baudrate. | |
Typedefs | |
typedef void(* | uart_tx_cbt) (void) |
OpenWSN uart tx callback type. | |
typedef void(* | uart_rx_cbt) (void) |
OpenWSN uart rx callback type. | |
Functions | |
void | uart_init_openwsn (void) |
Initialize OpenWSN uart. More... | |
void | uart_setCallbacks (uart_tx_cbt txCb, uart_rx_cbt rxCb) |
OpenWSN uart tx callback type. | |
void | uart_setCTS (bool state) |
Sets software flow control CTS. More... | |
void | uart_writeByte (uint8_t byteToWrite) |
Write a single byte to the configured OpenWSN uart. | |
uint8_t | uart_readByte (void) |
Reads a single byte received through uart. More... | |
void | uart_enableInterrupts (void) |
Unused in RIOT, needs to be defined for OpenWSN. | |
void | uart_disableInterrupts (void) |
Unused in RIOT, needs to be defined for OpenWSN. | |
void | uart_clearRxInterrupts (void) |
Unused in RIOT, needs to be defined for OpenWSN. | |
void | uart_clearTxInterrupts (void) |
Unused in RIOT, needs to be defined for OpenWSN. | |
#define OPENWSN_UART_DEV ((STDIO_UART_DEV + 1) % UART_NUMOF) |
OpenWSN default uart dev.
Definition at line 56 of file openwsn_uart.h.
#define STDIO_UART_DEV (UART_DEV(0)) |
UART device to use for STDIO.
Dont want to include the stdio header, so redefine the default value
Definition at line 43 of file openwsn_uart.h.
void uart_init_openwsn | ( | void | ) |
Initialize OpenWSN uart.
This will initialize a uart device at STDIO_UART_BAUDRATE/8N1. It will also initialize a timer to set sw tx_isr.
uint8_t uart_readByte | ( | void | ) |
Reads a single byte received through uart.
OpenWSN will call this thrpugh uart_rx_cbt.
void uart_setCTS | ( | bool | state | ) |
Sets software flow control CTS.
This function sends XON or XOFF bytes to "set" or "unset" CTS by sw.
[in] | state | true sets CTS, false clears CTS |