Drivers Libraries Help > BM71 Bluetooth Driver Library > Library Interface > a) System Functions > DRV_BM71_ReadByteFromBLE Function
MPLAB Harmony Bluetooth Help
DRV_BM71_ReadByteFromBLE Function

Read a byte over BLE.

Description

Function DRV_BM71_ReadByteFromBLE: 

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

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

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 
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_BM71) is used
if (DRV_BT_ReadByteFromBLE(appData.bt.handle, &byte))  // if byte received
{
    // do something
} 
C
bool DRV_BM71_ReadByteFromBLE(
    const DRV_HANDLE handle, 
    uint8_t* byte
);