Drivers Libraries Help > BM71 Bluetooth Driver Library > Library Interface > h) BLE Functions > DRV_BM71_ClearBLEData Function
MPLAB Harmony Bluetooth Help
DRV_BM71_ClearBLEData Function

Clear the BLE receive buffer.

Description

Function DRV_BM71_ClearBLEData: 

void DRV_BM71_ClearBLEData( const DRV_HANDLE handle ); 

Clears the buffer used when receiving characters via the DRV_BM71_ReadByteFromBLE and DRV_BM71_ReadDataFromBLE calls.

Preconditions

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

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

None.

Example
uint8_t byte;

// note generic versions of calls (DRV_BT instead of DRV_BM71) is used
DRV_BT_ClearBLEData(appData.bt.handle);

// wait for byte to arrive
while (!DRV_BT_ReadByteFromBLE(appData.bt.handle, &byte))
{
    // should have some sort of way to break out of here if byte never arrives
}
C
void DRV_BM71_ClearBLEData(
    const DRV_HANDLE handle
);