Drivers Libraries Help > BM64 Bluetooth Driver Library > Library Interface > e) Bluetooth-specific Functions > DRV_BM64_EnterBTPairingMode Function
MPLAB Harmony Bluetooth Help
DRV_BM64_EnterBTPairingMode Function

Enter Bluetooth pairing mode.

Description

Function DRV_BM64_EnterBTPairingMode: 

void DRV_BM64_EnterBTPairingMode(const DRV_HANDLE handle); 

Starting the pairing process, making this BM64 available for pairing with a Bluetooth host.

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
case BUTTON_STATE_PRESSED:      // (debouncing not shown)
{
    if (BSP_SwitchStateGet(BSP_SWITCH_1)==BSP_SWITCH_STATE_PRESSED))
    {
        // note generic version of call (DRV_BT instead of DRV_BM64) is used
        DRV_BT_EnterBTPairingMode(appData.bt.handle);               
        appData.buttonState=BUTTON_STATE_WAIT_FOR_RELEASE;                
    }
}
break;
C
void DRV_BM64_EnterBTPairingMode(
    const DRV_HANDLE handle
);