Microchip® Advanced Software Framework

ble_sdk/services/serial_bridge/uart/sam0/serial_bridge.c File Reference
#include "asf.h"
#include "serial_bridge.h"
#include "conf_serialbridge.h"
#include "serial_fifo.h"
#include "ble_utils.h"
#include "conf_serialdrv.h"

Functions

void platform_dtm_interface_receive (uint8_t rx_data)
 
void platform_start_rx (void)
 This module performs serial input/output functionalities via UART. More...
 
uint8_t serial_bridge_init (void)
 This module performs serial input/output functionalities via UART. More...
 
void serial_bridge_task (void)
 Bridges the UARTS. More...
 
static void serial_drv_edbg_read_cb (struct usart_module *const module)
 
static void serial_drv_edbg_write_cb (struct usart_module *const module)
 
static uint8_t serial_eread_byte (uint16_t *data)
 

Variables

static uint8_t ble_eusart_rx_buf [BLE_MAX_RX_PAYLOAD_SIZE]
 
static ser_fifo_desc_t ble_eusart_rx_fifo
 
static uint8_t ble_eusart_tx_buf [BLE_MAX_TX_PAYLOAD_SIZE]
 
static ser_fifo_desc_t ble_eusart_tx_fifo
 
uint8_t ble_usart_rx_buf [BLE_MAX_RX_PAYLOAD_SIZE]
 
ser_fifo_desc_t ble_usart_rx_fifo
 
static uint8_t ble_usart_tx_buf [BLE_MAX_TX_PAYLOAD_SIZE]
 
ser_fifo_desc_t ble_usart_tx_fifo
 
static struct usart_module eusart_instance
 
static uint16_t g_etxdata
 
static uint16_t g_txdata
 
static uint16_t rx_edata
 
struct usart_module usart_instance
 [module_inst] More...
 

void platform_dtm_interface_receive ( uint8_t  rx_data)
void platform_start_rx ( void  )

This module performs serial input/output functionalities via UART.

References rx_data, and serial_read_byte().

Referenced by main(), platform_dtm_interface_receive(), platform_recv_async(), and usart_configure().

void serial_bridge_task ( void  )

Bridges the UARTS.

Parameters
Takesthe data from one USART Rx to other USART Tx and vice versa
Returns
None

References eusart_instance, g_etxdata, g_txdata, SER_FIFO_OK, ser_fifo_pull_uint8(), ser_fifo_push_uint8(), STATUS_OK, usart_get_job_status(), usart_instance, USART_TRANSCEIVER_TX, and usart_write_job().

static void serial_drv_edbg_read_cb ( struct usart_module *const  module)
static
static void serial_drv_edbg_write_cb ( struct usart_module *const  module)
static
static uint8_t serial_eread_byte ( uint16_t *  data)
static

uint8_t ble_eusart_rx_buf[BLE_MAX_RX_PAYLOAD_SIZE]
static

Referenced by serial_bridge_init().

ser_fifo_desc_t ble_eusart_rx_fifo
static
uint8_t ble_eusart_tx_buf[BLE_MAX_TX_PAYLOAD_SIZE]
static

Referenced by serial_bridge_init().

ser_fifo_desc_t ble_eusart_tx_fifo
static
uint8_t ble_usart_rx_buf[BLE_MAX_RX_PAYLOAD_SIZE]
ser_fifo_desc_t ble_usart_rx_fifo
uint8_t ble_usart_tx_buf[BLE_MAX_TX_PAYLOAD_SIZE]
static

Referenced by serial_bridge_init().

ser_fifo_desc_t ble_usart_tx_fifo
uint16_t g_etxdata
static
uint16_t g_txdata
static

Referenced by serial_bridge_task().

uint16_t rx_edata
static