USB Libraries Help > USB Device Libraries > USB Device Layer Library > Library Interface > c) Device Power State Management Functions > USB_DEVICE_RemoteWakeupStatusGet Function
MPLAB Harmony USB Stack
USB_DEVICE_RemoteWakeupStatusGet Function

This function returns the present "Remote Wake-up" status of the device. If the device supports remote wake-up, the host may enable of disable this feature. The client can use this function to find out the status of this feature.

C
USB_DEVICE_REMOTE_WAKEUP_STATUS USB_DEVICE_RemoteWakeupStatusGet(
    USB_DEVICE_HANDLE usbDeviceHandle
);
Preconditions

The device layer should have been initialized and opened.

Parameters
Parameters 
Description 
usbDeviceHandle 
USB device handle returned by USB_DEVICE_Open(). 
Returns

USB_DEVICE_REMOTE_WAKEUP_ENABLED - Remote wakeup is enabled. USB_DEVICE_REMOTE_WAKEUP_DISABLED - Remote wakeup is disabled.

Remarks

None.

Example
// This code example checks if the host has enabled the remote wake-up    
// feature and then starts resume signaling. It is assumed
// that the device is in suspended mode.

USB_DEVICE_HANDLE usbDeviceHandle;

if(USB_DEVICE_RemoteWakeupStatusGet(usbDeviceHandle))
{
    // Start resume signaling.

    USB_DEVICE_RemoteWakeupStart(usbDeviceHandle);
}