This module performs serial input/output functionalities via UART from and to the HOST.
Macros | |
#define | SERIAL_RX_BUF_SIZE_NCP 156 |
Functions | |
uint8_t | sio2ncp_getchar (void) |
This function performs a blocking character receive functionality. More... | |
int | sio2ncp_getchar_nowait (void) |
This function performs a non-blocking character receive functionality. More... | |
void | sio2ncp_init (void) |
Initializes the Serial IO Module of the NCP Device. More... | |
uint8_t | sio2ncp_rx (uint8_t *data, uint8_t max_length) |
Receives data from UART. More... | |
uint8_t | sio2ncp_tx (uint8_t *data, uint8_t length) |
Transmits data via UART. More... | |
void | USART_NCP_ISR_VECT (uint8_t instance) |
#define SERIAL_RX_BUF_SIZE_NCP 156 |
Referenced by sio2ncp_rx(), and USART_NCP_ISR_VECT().
uint8_t sio2ncp_getchar | ( | void | ) |
This function performs a blocking character receive functionality.
References sio2ncp_rx().
int sio2ncp_getchar_nowait | ( | void | ) |
This function performs a non-blocking character receive functionality.
References sio2ncp_rx().
void sio2ncp_init | ( | void | ) |
Initializes the Serial IO Module of the NCP Device.
References IOPORT_DIR_OUTPUT, IOPORT_PIN_LEVEL_HIGH, ioport_set_pin_dir(), ioport_set_pin_level(), NCP_RESET_GPIO, stdio_serial_init(), USART_NCP, USART_NCP_BAUDRATE, USART_NCP_RX_ISR_ENABLE, and usart_serial_init().
Referenced by wpan_init().
uint8_t sio2ncp_rx | ( | uint8_t * | data, |
uint8_t | max_length | ||
) |
Receives data from UART.
data | pointer to the buffer where the received data is to be stored |
max_length | maximum length of data to be received |
References serial_rx_buf, serial_rx_buf_head, SERIAL_RX_BUF_SIZE_NCP, serial_rx_buf_tail, and serial_rx_count.
Referenced by sio2ncp_getchar(), sio2ncp_getchar_nowait(), and wpan_task().
uint8_t sio2ncp_tx | ( | uint8_t * | data, |
uint8_t | length | ||
) |
Transmits data via UART.
data | Pointer to the buffer where the data to be transmitted is present |
length | Number of bytes to be transmitted |
References length, status_code_genare_t, STATUS_OK, USART_NCP, and usart_serial_write_packet().
Referenced by wpan_mcps_data_req(), wpan_mcps_purge_req(), wpan_mlme_associate_req(), wpan_mlme_associate_resp(), wpan_mlme_disassociate_req(), wpan_mlme_get_req(), wpan_mlme_gts_req(), wpan_mlme_orphan_resp(), wpan_mlme_poll_req(), wpan_mlme_reset_req(), wpan_mlme_rx_enable_req(), wpan_mlme_scan_req(), wpan_mlme_set_req(), wpan_mlme_start_req(), and wpan_mlme_sync_req().
void USART_NCP_ISR_VECT | ( | uint8_t | instance | ) |