2.2.4.10 USB_DEVICE_RemoteWakeupStatusGet Function

C

USB_DEVICE_REMOTE_WAKEUP_STATUS USB_DEVICE_RemoteWakeupStatusGet(
    USB_DEVICE_HANDLE usbDeviceHandle
);

Summary

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.

Description

Description of the function.

Precondition

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.

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);
}

Remarks

None.