Microchip® Advanced Software Framework

interface.h File Reference

BM module Interface declaration.

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

Data Structures

struct  sw_timer_t
 

Macros

#define INTERFACE_CMD_COMPLETE_TIMEOUT   5000
 
#define INTERFACE_SW_TIMERS   5
 
#define INVALID_EVENT_ID   0xFF
 

Typedefs

typedef void(* timer_cb_t )(void)
 

Enumerations

enum  {
  INTERFACE_EVENT_WAITING,
  INTERFACE_EVENT_READY
}
 

Functions

void ble_api_register_uart_interface (uart_write_sync_cb_t uart_tx_cb, uart_read_async_cb_t uart_rx_cb)
 
bool ble_response_check (uint8_t byte)
 
event_tget_received_cmd_frame (void)
 
void init_fifo (void)
 
ble_status_t interface_cmd_send_no_wait (uint8_t *cmd, uint32_t cmd_len)
 
ble_status_t interface_cmd_send_wait (uint8_t *cmd, uint32_t cmd_len, uint8_t event_id)
 
ble_status_t interface_cmd_send_wait_time (uint8_t *cmd, uint32_t cmd_len, uint8_t event_id, uint16_t timeout)
 
event_status_t interface_event_get (void)
 
bool interface_event_process (void)
 
ble_status_t interface_event_wait (uint8_t event_id)
 
ble_status_t interface_event_wait_time (uint8_t event_id, uint16_t timeout)
 
ble_status_t interface_init (platform_init_t *platform_init)
 
bool is_waiting_for_response (void)
 
bool is_waiting_for_this_response (uint8_t event_id)
 
void store_uart_data (uint16_t rx_data)
 

#define INTERFACE_CMD_COMPLETE_TIMEOUT   5000
#define INTERFACE_SW_TIMERS   5
#define INVALID_EVENT_ID   0xFF

typedef void(* timer_cb_t)(void)

anonymous enum
Enumerator
INTERFACE_EVENT_WAITING 
INTERFACE_EVENT_READY 

void ble_api_register_uart_interface ( uart_write_sync_cb_t  uart_tx_cb,
uart_read_async_cb_t  uart_rx_cb 
)
bool ble_response_check ( uint8_t  byte)
void init_fifo ( void  )

References fifo_init(), and rx_fifo_buffer.

Referenced by interface_init().

ble_status_t interface_cmd_send_no_wait ( uint8_t *  cmd,
uint32_t  cmd_len 
)
ble_status_t interface_cmd_send_wait ( uint8_t *  cmd,
uint32_t  cmd_len,
uint8_t  event_id 
)

References BLE_SUCCESS, BLE_UART_TIMEOUT, INTERFACE_CMD_COMPLETE_TIMEOUT, interface_event_process(), interface_start_timer(), interface_stop_timer(), interface_uart_timer_handle, interface_uart_timer_timeout, resp_event_id, and ble_platform_api_list_t::uart_tx_cb.

Referenced by ble_adv_data_set(), ble_adv_param_set(), ble_adv_start(), ble_adv_stop(), ble_cancel_connection(), ble_characteristic_attribute_read_request(), ble_characteristic_attribute_read_response(), ble_characteristic_read(), ble_characteristic_read_by_uuid(), ble_characteristic_reliable_write_request_cancel(), ble_characteristic_reliable_write_request_execute(), ble_characteristic_reliable_write_request_prepare(), ble_characteristic_reliable_write_response_execute(), ble_characteristic_reliable_write_response_prepare(), ble_characteristic_value_read(), ble_characteristic_value_send(), ble_characteristic_value_update(), ble_characteristic_write_with_response(), ble_characteristic_write_without_respose(), ble_error_response_send(), ble_gatt_service_create(), ble_gatt_service_read(), ble_init(), ble_pair_device_delete(), ble_pair_device_erase_all(), ble_pair_mode_get(), ble_pair_mode_set(), ble_pair_passkey_clear(), ble_pair_passkey_confirm(), ble_pair_passkey_enter(), ble_pair_passkey_erase_digits(), ble_pair_passkey_reply(), ble_pair_request(), ble_primary_service_characteristics_discover(), ble_primary_service_characteristics_read(), ble_primary_service_read_all(), ble_read_response_send(), ble_rssi_read(), ble_scan_param_set(), ble_scan_resp_data_set(), ble_scan_start(), ble_set_connection_params(), ble_set_device_name(), ble_shutdown(), ble_transparent_uart_data_send(), ble_transparent_uart_enable(), ble_update_connection_parameters(), ble_write_response_send(), dfu_deinit(), dfu_init(), dfu_program_memory_erase(), dfu_program_memory_read(), dfu_program_memory_write(), and dfu_program_memory_write_continue().

ble_status_t interface_cmd_send_wait_time ( uint8_t *  cmd,
uint32_t  cmd_len,
uint8_t  event_id,
uint16_t  timeout 
)
event_status_t interface_event_get ( void  )

Referenced by ble_event_get().

bool is_waiting_for_response ( void  )

References INVALID_EVENT_ID, and resp_event_id.

Referenced by interface_event_process().

bool is_waiting_for_this_response ( uint8_t  event_id)

References INVALID_EVENT_ID, and resp_event_id.

Referenced by interface_event_process().