Microchip® Advanced Software Framework

ble_sdk/services/serial_bridge/uart/serial_bridge.h File Reference
#include "compiler.h"
#include "status_codes.h"

Functions

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...
 
void platform_dtm_interface_receive (uint8_t rx_data)
 

void platform_dtm_interface_receive ( uint8_t  rx_data)
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

References sam_usart_opt_t::baudrate, ble_eusart_rx_buf, ble_eusart_tx_buf, ble_usart_rx_buf, ble_usart_tx_buf, CONF_UART_BAUDRATE, pio_pull_up(), PIO_PULLUP, ser_fifo_init(), STATUS_OK, sysclk_enable_peripheral_clock(), sysclk_get_peripheral_hz(), uart_enable_interrupt(), uart_init(), sam_uart_opt::ul_mck, usart_enable_interrupt(), usart_enable_rx(), usart_enable_tx(), and usart_init_rs232().

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 ble_eusart_tx_cmpl, ble_pdc_send_data(), ble_usart_tx_cmpl, SER_FIFO_OK, ser_fifo_pull_uint8(), ser_fifo_push_uint8(), uart_enable_interrupt(), uart_write(), usart_enable_interrupt(), and usart_putchar().