Drivers Libraries Help > BM64 Bluetooth Driver Library > Library Interface > h) BLE Functions > DRV_BM64_BLE_QueryStatus Function
MPLAB Harmony Bluetooth Help
DRV_BM64_BLE_QueryStatus Function

Query BM64 LE status.

Description

Function DRV_BM64_BLE_QueryStatus: 

void DRV_BM64_BLE_QueryStatus(const DRV_HANDLE handle); 

Queries the BM64 to respond with a DRV_BM64_EVENT_BLE_STATUS_CHANGED event, which will indicate if the BM64 BLE status is standby, advertising, scanning or connected.

Preconditions

DRV_BM64_Open must have been called to obtain a valid opened device handle.

Parameters
Parameters 
Description 
handle 
valid handle to an opened BM64 device driver unique to client 
Returns

None.

Example
// note generic version of call (DRV_BT instead of DRV_BM64) is used
DRV_BT_BLE_QueryStatus(appData.bt.handle);

. . .

// later, a call will come back to the event handler callback function
// (previously set up via a call to DRV_BM64_EventHandlerSet)
static void _BLEEventHandler(DRV_BT_EVENT event, uint32_t param, uintptr_t context)
{
    switch(event)
    {
        case DRV_BT_EVENT_BLE_STATUS_CHANGED:
        {           
            // do case switch based on param variable
        }
   }
}    
C
void DRV_BM64_BLE_QueryStatus(
    const DRV_HANDLE handle
);