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

Read a byte over BLE.

Description

Function DRV_BM64_ReadByteFromBLE: 

bool DRV_BM64_ReadByteFromBLE(const DRV_HANDLE handle, uint8_t* byte); 

Read one byte over BLE using the BM64's "Transparent Service" feature.

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 
byte 
pointer to a uint8_t to receive the data 
Returns

bool - true if a byte was returned, false if receive buffer empty

Example
uint8_t byte;

// note generic version of call (DRV_BT instead of DRV_BM64) is used
if (DRV_BT_ReadByteFromBLE(appData.bt.handle, &byte))  // if byte received
{
    // do something
} 
C
bool DRV_BM64_ReadByteFromBLE(
    const DRV_HANDLE handle, 
    uint8_t* byte
);