Drivers Libraries Help > BM64 Bluetooth Driver Library > Library Interface > f) AVRCP Functions > DRV_BM64_GetPlayingStatus Function
MPLAB Harmony Bluetooth Help
DRV_BM64_GetPlayingStatus Function

Return the current playing status of the device.

Description

Function DRV_BM64_GetPlayingStatus: 

void DRV_BM64_GetPlayingStatus(const DRV_HANDLE handle); 

Return the current AVRCP playing status of the device, e.g. stopped, playing, paused, fast forward or rewind, encoded as as the enum DRV_BM64_PLAYINGSTATUS.

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_3)==BSP_SWITCH_STATE_PRESSED))
    { 
        // note generic version of call (DRV_BT instead of DRV_BM64) is used
        DRV_BT_PLAYINGSTATUS playingStatus = DRV_BT_GetPlayingStatus(appData.bt.handle);
        if ((playingStatus==DRV_BT_PLAYING_FF)||(playingStatus==DRV_BT_PLAYING_FR))
        {
           if (DRV_BT_GetLinkStatus(appData.bt.handle) & DRV_BT_AVRCP_LINK_STATUS)
           {                 
               DRV_BT_CancelForwardOrRewind(appData.bt.handle);
           }
        }
    }
}
break;
C
DRV_BM64_PLAYINGSTATUS DRV_BM64_GetPlayingStatus(
    const DRV_HANDLE handle
);