Microchip® Advanced Software Framework

ble_host_sdk/services/serial/uart/serial_drv.h File Reference
#include "compiler.h"
#include "status_codes.h"

Functions

void platform_start_rx (void)
 This module performs serial input/output functionalities via UART. More...
 
uint8_t configure_serial_drv (uint32_t)
 Initializes the Serial IO Module. More...
 
uint16_t serial_drv_send (uint8_t *data, uint16_t len)
 Transmits data via UART. More...
 
uint8_t serial_read_data (uint8_t *data, uint16_t max_len)
 Receives data from UART. More...
 
uint8_t serial_read_byte (uint16_t *data)
 
void configure_usart_after_patch (uint32_t)
 
uint32_t platform_serial_drv_tx_status (void)
 
void platform_leave_critical_section (void)
 
void platform_enter_critical_section (void)
 
void platform_set_ble_rts_high (void)
 
void platform_set_ble_rts_low (void)
 
void platform_set_hostsleep (void)
 
void platform_restore_from_sleep (void)
 
void platform_configure_sleep_manager (void)
 
uint16_t serial_drive_rx_data_count (void)
 

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
void configure_usart_after_patch ( uint32_t  )
void platform_configure_sleep_manager ( void  )
void platform_enter_critical_section ( void  )
void platform_leave_critical_section ( void  )
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  )

This module performs serial input/output functionalities via UART.

uint16_t serial_drive_rx_data_count ( void  )
uint16_t serial_drv_send ( uint8_t *  data,
uint16_t  len 
)

Transmits data via UART.

Parameters
dataPointer to the buffer where the data to be transmitted is present
lengthNumber of bytes to be transmitted
Returns
Number of bytes actually transmitted
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
datapointer to the buffer where the received data is to be stored
max_lengthmaximum length of data to be received
Returns
actual number of bytes received