Microchip® Advanced Software Framework

sio2ncp.c File Reference

Handles Serial I/O Functionalities.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "sio2ncp.h"
#include "conf_sio2ncp.h"

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)
 

Variables

static uint8_t serial_rx_buf [SERIAL_RX_BUF_SIZE_NCP]
 Receive buffer The buffer size is defined in sio2ncp.h. More...
 
static uint8_t serial_rx_buf_head
 Receive buffer head. More...
 
static uint8_t serial_rx_buf_tail
 Receive buffer tail. More...
 
static uint8_t serial_rx_count
 Number of bytes in receive buffer. More...
 
static usart_serial_options_t usart_serial_options
 

uint8_t serial_rx_buf[SERIAL_RX_BUF_SIZE_NCP]
static

Receive buffer The buffer size is defined in sio2ncp.h.

Referenced by sio2ncp_rx(), and USART_NCP_ISR_VECT().

uint8_t serial_rx_buf_head
static

Receive buffer head.

Referenced by sio2ncp_rx().

uint8_t serial_rx_buf_tail
static

Receive buffer tail.

Referenced by sio2ncp_rx(), and USART_NCP_ISR_VECT().

uint8_t serial_rx_count
static

Number of bytes in receive buffer.

Referenced by sio2ncp_rx().

usart_serial_options_t usart_serial_options
static
Initial value:
= {
.baudrate = USART_NCP_BAUDRATE,
.charlength = USART_NCP_CHAR_LENGTH,
.paritytype = USART_NCP_PARITY,
.stopbits = USART_NCP_STOP_BITS
}
#define USART_NCP_PARITY
Parity setting.
Definition: conf_sio2ncp.h:46
#define USART_NCP_CHAR_LENGTH
Character length setting.
Definition: conf_sio2ncp.h:44
#define USART_NCP_BAUDRATE
Baudrate setting.
Definition: conf_sio2ncp.h:42
#define USART_NCP_STOP_BITS
Stop bits setting.
Definition: conf_sio2ncp.h:48

Referenced by sio2host_init().