|
SmartSnippets DA1459x SDK
|
BLE Adapter API. More...
Files | |
| file | ad_ble.h |
| BLE Adapter API. | |
Data Structures | |
| struct | ble_hci_cmd_hdr |
| struct | ble_hci_acl_msg_hdr |
| struct | ble_hci_sco_hdr |
| struct | ble_hci_evt_hdr |
| struct | hci_cmd_msg |
| struct | hci_acl_msg |
| struct | hci_sco_msg |
| struct | hci_evt_msg |
| struct | ble_hci_msg |
| struct | ble_gtl_msg |
| struct | ble_stack_msg |
| struct | ad_ble_msg |
| struct | ad_ble_hdr |
| struct | ad_ble_interface_t |
| struct | ad_ble_lld_stats |
| Structure for low level driver statistics. More... | |
Macros | |
| #define | HCI_CMD_HEADER_LENGTH 3 |
| Kernel message header length for transport through interface between App and SW stack. | |
Typedefs | |
| typedef struct ble_hci_cmd_hdr | ble_hci_cmd_hdr_t |
| typedef struct ble_hci_acl_msg_hdr | ble_hci_acl_hdr_t |
| typedef struct ble_hci_sco_hdr | ble_hci_sco_hdr_t |
| typedef struct ble_hci_evt_hdr | ble_hci_evt_hdr_t |
| typedef struct hci_cmd_msg | hci_cmd_msg_t |
| typedef struct hci_acl_msg | hci_acl_msg_t |
| typedef struct hci_sco_msg | hci_sco_msg_t |
| typedef struct hci_evt_msg | hci_evt_msg_t |
| typedef struct ble_hci_msg | ble_hci_msg_t |
| typedef struct ble_gtl_msg | ble_gtl_msg_t |
| typedef struct ble_stack_msg | ble_stack_msg_t |
| typedef struct ad_ble_msg | ad_ble_msg_t |
| typedef struct ad_ble_hdr | ad_ble_hdr_t |
Functions | |
| OS_BASE_TYPE | ad_ble_command_queue_send (const void *item, OS_TICK_TIME wait_ticks) |
| Send a message to the BLE adapter command queue. More... | |
| void | ad_ble_lpclock_available (void) |
| Notify the BLE adapter that LP clock is available. More... | |
| OS_BASE_TYPE | ad_ble_event_queue_send (const void *item, OS_TICK_TIME wait_ticks) |
| Send a message to the BLE adapter event queue. More... | |
| void | ad_ble_task_notify (uint32_t value) |
| Notify BLE adapter. More... | |
| void | ad_ble_init (void) |
| Initialize BLE adapter - create command and event queues. More... | |
| const ad_ble_interface_t * | ad_ble_get_interface (void) |
| Get BLE Adapter interface. More... | |
| OS_BASE_TYPE | ad_ble_event_queue_register (const OS_TASK task_handle) |
| Register task for BLE Adapter's event Queue notifications. More... | |
| void | ad_ble_get_public_address (uint8_t address[BD_ADDR_LEN]) |
| Get public static address. More... | |
| bool | ad_ble_read_nvms_param (uint8_t *param, uint8_t len, uint8_t nvparam_tag, uint32_t nvms_addr) |
| Read configuration parameters form NVMS parameter area. More... | |
| void | ad_ble_get_irk (uint8_t irk[KEY_LEN]) |
| Get device's IRK. More... | |
| void | ad_ble_notify_event_queue_avail (void) |
| Notifies BLE adapter that there is free space on the event queue. | |
| nvparam_t | ad_ble_get_nvparam_handle (void) |
| Get non-volatile parameter handle. More... | |
| void | ad_ble_stay_active (bool status) |
| Force BLE to stay active. More... | |
| bool | ad_ble_non_retention_heap_in_use (void) |
| Check if the non retention BLE heap is in use. | |
| void | ad_ble_sys_tcs_config (void) |
| Configure CMAC SYS TCS table. | |
| void | ad_ble_get_lld_stats (struct ad_ble_lld_stats *stats) |
| Gets low level driver statistics. | |
BLE Adapter API.
| typedef struct ad_ble_hdr ad_ble_hdr_t |
BLE adapter message header structure
| typedef struct ad_ble_msg ad_ble_msg_t |
BLE adapter message structure
| typedef struct ble_gtl_msg ble_gtl_msg_t |
GTL message format
| typedef struct ble_hci_acl_msg_hdr ble_hci_acl_hdr_t |
HCI ACL data message header format
| typedef struct ble_hci_cmd_hdr ble_hci_cmd_hdr_t |
HCI command message header format
| typedef struct ble_hci_evt_hdr ble_hci_evt_hdr_t |
HCI event message header format
| typedef struct ble_hci_msg ble_hci_msg_t |
HCI message format
| typedef struct ble_hci_sco_hdr ble_hci_sco_hdr_t |
HCI synchronous data message header format
| typedef struct ble_stack_msg ble_stack_msg_t |
BLE stack message structure
| typedef struct hci_acl_msg hci_acl_msg_t |
HCI ACL data message format
| typedef struct hci_cmd_msg hci_cmd_msg_t |
HCI command message format
| typedef struct hci_evt_msg hci_evt_msg_t |
HCI event message format
| typedef struct hci_sco_msg hci_sco_msg_t |
HCI synchronous data message format
| OS_BASE_TYPE ad_ble_command_queue_send | ( | const void * | item, |
| OS_TICK_TIME | wait_ticks | ||
| ) |
Send a message to the BLE adapter command queue.
Sends a message to the BLE adapter command queue and notifies the BLE adapter task.
| [in] | item | Pointer to the item to be sent to the queue. |
| [in] | wait_ticks | Max time in ticks to wait for space in queue. |
| OS_BASE_TYPE ad_ble_event_queue_register | ( | const OS_TASK | task_handle | ) |
Register task for BLE Adapter's event Queue notifications.
| [in] | task_handle | The handle of the FreeRTOS task that registers for notifications. |
| OS_BASE_TYPE ad_ble_event_queue_send | ( | const void * | item, |
| OS_TICK_TIME | wait_ticks | ||
| ) |
Send a message to the BLE adapter event queue.
Sends a message to the BLE adapter event queue and notifies the registered task.
| [in] | item | Pointer to the item to be sent to the queue. |
| [in] | wait_ticks | Max time in ticks to wait for space in queue |
| const ad_ble_interface_t* ad_ble_get_interface | ( | void | ) |
Get BLE Adapter interface.
| void ad_ble_get_irk | ( | uint8_t | irk[KEY_LEN] | ) |
Get device's IRK.
This will be either the IRK read from NVMS or the default IRK.
| [out] | irk | Device's IRK |
| nvparam_t ad_ble_get_nvparam_handle | ( | void | ) |
Get non-volatile parameter handle.
Function gets parameter handle to be used
| void ad_ble_get_public_address | ( | uint8_t | address[BD_ADDR_LEN] | ) |
Get public static address.
This will be either the address read from NVMS or the default address. Since this address does not change once it has been loaded, it's safe to call it at any time from any task
| [out] | address | Public static address |
| void ad_ble_init | ( | void | ) |
Initialize BLE adapter - create command and event queues.
| void ad_ble_lpclock_available | ( | void | ) |
Notify the BLE adapter that LP clock is available.
This will send a notification to the BLE adapter informing it for the availability of the LP clock. From that moment onwards the BLE stack is allowed to enter the sleep state.
| bool ad_ble_read_nvms_param | ( | uint8_t * | param, |
| uint8_t | len, | ||
| uint8_t | nvparam_tag, | ||
| uint32_t | nvms_addr | ||
| ) |
Read configuration parameters form NVMS parameter area.
| [out] | param | storage for the read parameter |
| [in] | len | length of data to read |
| [in] | nvparam_tag | parameter tag |
| [in] | nvms_addr | offset address |
| void ad_ble_stay_active | ( | bool | status | ) |
Force BLE to stay active.
Forcing BLE to stay active could be helpful in periods with notable BLE traffic. This will result to reduced interrupt latencies, as BLE is not going to wake up too often due to the expected traffic load.
| [in] | status | defines if BLE sleep in allowed or not |
| void ad_ble_task_notify | ( | uint32_t | value | ) |
Notify BLE adapter.
Send a task notification on value notification bit(s) to the BLE adapter task.
| [in] | value | Notification mask to be set. |
1.8.16