Microchip® Advanced Software Framework

ble_sdk/inc/platform.h File Reference

Platform Abstraction layer for BLE applications.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "at_ble_api.h"

Data Structures

struct  os_signal
 

Macros

#define MAX_PLATFORM_OS_SIGNAL   (3)
 

Typedefs

typedef struct os_signal os_signal_t
 

Functions

void plaform_ble_rx_callback (void)
 
void platform_configure_hw_fc_uart (uint32_t baudrate)
 
void platform_configure_primary_uart (uint32_t baudrate)
 sends a message over the platform-specific bus and blocks until Tx Completes More...
 
void * platform_create_signal (void)
 
void * platform_create_timer (void(*timer_cb)(void *))
 
void platform_delete_signal (void *signal_handler)
 
void platform_delete_timer (void *timer_handle)
 
void platform_dma_process_rxdata (uint8_t *buf, uint16_t len)
 
void platform_enter_sleep (void)
 
void platform_gpio_set (at_ble_gpio_pin_t pin, at_ble_gpio_status_t status)
 
void platform_host_set_sleep (bool sleep)
 
at_ble_status_t platform_init (uint8_t bus_type, uint8_t btlc1000_module_version)
 implements platform-specific initialization More...
 
void platform_process_rxdata (uint8_t t_rx_data)
 
void platform_recv_async (void(*recv_async_callback)(uint8_t))
 
void platform_reset_signal (void *signal_handler)
 
void platform_send_sync (uint8_t *data, uint32_t len)
 
void platform_sleep (uint32_t ms)
 
void platform_start_timer (void *timer_handle, uint32_t ms)
 
void platform_stop_timer (void *timer_handle)
 
void platform_trigger_signal (void *signal_handler)
 
void platform_wait_for_signal (uint32_t count, void **signal_handler_list)
 
bool platform_wakeup_pin_status (void)
 

#define MAX_PLATFORM_OS_SIGNAL   (3)

typedef struct os_signal os_signal_t

void plaform_ble_rx_callback ( void  )
void platform_configure_hw_fc_uart ( uint32_t  baudrate)
void platform_configure_primary_uart ( uint32_t  baudrate)

sends a message over the platform-specific bus and blocks until Tx Completes

Sends a message over the platform-specific bus that might be UART, SPI

Parameters
[in]datadata to send over the interface
[in]lenlength of data

References configure_serial_drv().

Referenced by ble_device_init(), and ble_init().

void* platform_create_signal ( void  )
void* platform_create_timer ( void(*)(void *)  timer_cb)
void platform_delete_signal ( void *  signal_handler)
void platform_delete_timer ( void *  timer_handle)
void platform_dma_process_rxdata ( uint8_t *  buf,
uint16_t  len 
)

References recv_async_cb.

void platform_host_set_sleep ( bool  sleep)

References host_sleep_flag.

Referenced by ble_device_init(), and ble_init().

at_ble_status_t platform_init ( uint8_t  bus_type,
uint8_t  btlc1000_module_version 
)

implements platform-specific initialization

Parameters
[in]bus_typebus type can be UART or SPI
[in]btlc1000_module_versionBTLC1000 MR/ZR Module version
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

References ALL_UNUSED, AT_BLE_INVALID_PARAM, AT_BLE_SUCCESS, AT_BLE_UART, ble_assert, configure_serial_drv(), and platform_configure_sleep_manager().

void platform_process_rxdata ( uint8_t  t_rx_data)
void platform_recv_async ( void(*)(uint8_t)  recv_async_callback)
void platform_reset_signal ( void *  signal_handler)
void platform_send_sync ( uint8_t *  data,
uint32_t  len 
)
void platform_sleep ( uint32_t  ms)

References delay_ms.

void platform_start_timer ( void *  timer_handle,
uint32_t  ms 
)
void platform_stop_timer ( void *  timer_handle)
void platform_trigger_signal ( void *  signal_handler)
void platform_wait_for_signal ( uint32_t  count,
void **  signal_handler_list 
)
bool platform_wakeup_pin_status ( void  )