SmartSnippets DA1459x SDK
Files | Typedefs | Functions

Helper library API for BLE adapter message handling in BLE Manager. More...

Files

file  ble_mgr_ad_msg.h
 Helper library API for BLE adapter message handling in BLE Manager.
 

Typedefs

typedef void(* ble_ad_msg_wqueue_cb_t) (ad_ble_msg_t *ad_msg, void *param)
 Waitqueue callback. More...
 

Functions

void * ble_ad_msg_alloc (ad_ble_operation_t operation, uint16_t len)
 Allocate buffer for a BLE adapter message. More...
 
__STATIC_INLINE void ble_ad_msg_send (void *msg)
 Send BLE adapter message to adapter. More...
 
void ble_ad_msg_wqueue_add (ad_ble_operation_t rsp_op, ad_ble_operation_t cmd_op, ble_ad_msg_wqueue_cb_t cb, void *param)
 Add callback to waitqueue. More...
 
bool ble_ad_msg_waitqueue_match (ad_ble_msg_t *ad_msg)
 
void ble_adapter_cmp_evt_init (ad_ble_msg_t *ad_msg, void *param)
 

Detailed Description

Helper library API for BLE adapter message handling in BLE Manager.

Typedef Documentation

◆ ble_ad_msg_wqueue_cb_t

typedef void(* ble_ad_msg_wqueue_cb_t) (ad_ble_msg_t *ad_msg, void *param)

Waitqueue callback.

Function Documentation

◆ ble_ad_msg_alloc()

void* ble_ad_msg_alloc ( ad_ble_operation_t  operation,
uint16_t  len 
)

Allocate buffer for a BLE adapter message.

Message will be set with passed operation code.

Parameters
[in]operationBLE adapter operation code
[in]lenmessage length
Returns
message pointer

◆ ble_ad_msg_send()

__STATIC_INLINE void ble_ad_msg_send ( void *  msg)

Send BLE adapter message to adapter.

Parameters
[in]msgmessage pointer

◆ ble_ad_msg_waitqueue_match()

bool ble_ad_msg_waitqueue_match ( ad_ble_msg_t ad_msg)

Match BLE adapter message against waitqueue

On positive match, this will remove element from waitqueue and fire associated callback.

Parameters
[in]ad_msgBLE adapter message pointer
Returns
true if matches, false otherwise

◆ ble_ad_msg_wqueue_add()

void ble_ad_msg_wqueue_add ( ad_ble_operation_t  rsp_op,
ad_ble_operation_t  cmd_op,
ble_ad_msg_wqueue_cb_t  cb,
void *  param 
)

Add callback to waitqueue.

This adds callback for waitqueue associated with specific combination of response's operation code and command's operation code.

Parameters
[in]rsp_op
[in]cmd_op
[in]cb
[in]param

◆ ble_adapter_cmp_evt_init()

void ble_adapter_cmp_evt_init ( ad_ble_msg_t ad_msg,
void *  param 
)

Follow-up action on reception of a BLE_ADAPTER_CMP_EVT from the BLE adapter

Parameters
[in]ad_msgBLE adapter message pointer
[in]paramPointer to passing parameter