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

Clear the BLE receive buffer.

Description

Function DRV_BM64_ClearBLEData: 

void DRV_BM64_ClearBLEData( const DRV_HANDLE handle ); 

Clears the buffer used when receiving characters via the DRV_BM64_ReadByteFromBLE and DRV_BM64_ReadDataFromBLE calls.

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
uint8_t byte;

// note generic versions of calls (DRV_BT instead of DRV_BM64) 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_BM64_ClearBLEData(
    const DRV_HANDLE handle
);