#include "asf.h"
#include "serial_drv.h"
#include "serial_fifo.h"
#include "ble_utils.h"
#include "conf_serialdrv.h"
uint8_t configure_serial_drv |
( |
uint32_t |
| ) |
|
Initializes the Serial IO Module.
- Returns
- STATUS_OK for successful initialization and FAILURE incase the IO is not initialized
References usart_config::baudrate, 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_data, serial_drv_read_cb(), serial_drv_write_cb(), serial_read_byte(), STATUS_OK, USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_BUFFER_TRANSMITTED, usart_configure(), usart_configure_flowcontrol(), usart_enable(), usart_enable_callback(), usart_get_config_defaults(), usart_init(), usart_instance, usart_register_callback(), and usart_reset().
void configure_usart_after_patch |
( |
uint32_t |
baudrate | ) |
|
void platform_configure_sleep_manager |
( |
void |
| ) |
|
void platform_enter_critical_section |
( |
void |
| ) |
|
void platform_leave_critical_section |
( |
void |
| ) |
|
void platform_process_rxdata |
( |
uint8_t |
t_rx_data | ) |
|
void platform_restore_from_sleep |
( |
void |
| ) |
|
uint32_t platform_serial_drv_tx_status |
( |
void |
| ) |
|
void platform_set_ble_rts_high |
( |
void |
| ) |
|
void platform_set_ble_rts_low |
( |
void |
| ) |
|
void platform_set_hostsleep |
( |
void |
| ) |
|
void platform_start_rx |
( |
void |
| ) |
|
uint16_t serial_drive_rx_data_count |
( |
void |
| ) |
|
static void serial_drv_read_cb |
( |
struct usart_module *const |
usart_module | ) |
|
|
static |
uint16_t serial_drv_send |
( |
uint8_t * |
data, |
|
|
uint16_t |
len |
|
) |
| |
static void serial_drv_write_cb |
( |
struct usart_module *const |
usart_module | ) |
|
|
static |
uint8_t serial_read_byte |
( |
uint16_t * |
data | ) |
|
uint8_t serial_read_data |
( |
uint8_t * |
data, |
|
|
uint16_t |
max_len |
|
) |
| |
Receives data from UART.
- Parameters
-
data | pointer to the buffer where the received data is to be stored |
max_length | maximum length of data to be received |
- Returns
- actual number of bytes received
References usart_instance, and usart_read_buffer_job().
static void usart_configure_flowcontrol |
( |
uint32_t |
baudrate | ) |
|
|
inlinestatic |
References usart_config::baudrate, 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_data, serial_drv_read_cb(), serial_drv_write_cb(), serial_read_byte(), STATUS_OK, USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_BUFFER_TRANSMITTED, usart_enable(), usart_enable_callback(), usart_get_config_defaults(), usart_init(), usart_instance, usart_register_callback(), and usart_reset().
Referenced by configure_serial_drv(), and configure_usart_after_patch().