#include "asf.h"
#include "serial_bridge.h"
#include "conf_serialbridge.h"
#include "serial_fifo.h"
#include "ble_utils.h"
#include "conf_serialdrv.h"
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.
Initializes the Serial IO Module
- Returns
- STATUS_OK for successful initialization and FAILURE incase the IO is not initialized
References usart_config::baudrate, ble_eusart_rx_buf, ble_eusart_tx_buf, ble_usart_rx_buf, ble_usart_tx_buf, eusart_instance, GCLK_GENERATOR_0, usart_config::generator_source, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, rx_edata, ser_fifo_init(), serial_drv_edbg_read_cb(), serial_drv_edbg_write_cb(), serial_eread_byte(), STATUS_OK, USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_BUFFER_TRANSMITTED, usart_enable(), usart_enable_callback(), usart_get_config_defaults(), usart_init(), and usart_register_callback().
void serial_bridge_task |
( |
void |
| ) |
|
Bridges the UARTS.
- Parameters
-
Takes | the 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 |
uint8_t ble_eusart_tx_buf[BLE_MAX_TX_PAYLOAD_SIZE] |
|
static |
uint8_t ble_usart_rx_buf[BLE_MAX_RX_PAYLOAD_SIZE] |
uint8_t ble_usart_tx_buf[BLE_MAX_TX_PAYLOAD_SIZE] |
|
static |
[module_inst]
Referenced by configure_serial_drv(), configure_usart(), configure_usart_callbacks(), main(), platform_serial_drv_tx_status(), platform_set_ble_rts_high(), platform_set_ble_rts_low(), serial_bridge_task(), serial_drv_send(), serial_read_byte(), serial_read_data(), setup_transfer_descriptor_rx(), setup_transfer_descriptor_tx(), test_standby_mode_dynamic_power_sleepwalking(), test_standby_mode_static_power_sleepwalking(), uart_read_data(), usart_configure(), usart_configure_flowcontrol(), and usart_read_callback().