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)
 
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)

Referenced by ble_init().

void platform_start_rx ( void  )
uint8_t serial_bridge_init ( void  )

This module performs serial input/output functionalities via UART.

Initializes the Serial IO Module

Returns
STATUS_OK for successful initialization and FAILURE incase the IO is not initialized

Referenced by main().

void serial_bridge_task ( void  )

Bridges the UARTS.

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

Referenced by main().

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]

Referenced by serial_bridge_init().

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