2.2.4.12 USB_DEVICE_RemoteWakeupStart Function

C

void USB_DEVICE_RemoteWakeupStart(
    USB_DEVICE_HANDLE usbDeviceHandle
);

Summary

This function will start the resume signaling on the bus. The client calls this function after it has detected a idle bus (through the USB_DEVICE_EVENT_SUSPENDED event). The remote wake-up feature should have been enabled by the host, before the client can call this function. The client can use the USB_DEVICE_RemoteWakeupStatusGet function to check if the host has enabled the remote wake-up feature.

Precondition

Client handle should be valid. The remote wake-up feature should have been enabled by the host.

Parameters

Parameters Description
usbDeviceHandle Client's driver handle (returned from USB_DEVICE_Open)

Returns

None.

Example

// This code example shows how the device can enable and disable
// Resume signaling on the bus. These function should only be called if the 
// device support remote wakeup and the host has enabled this 
// feature. 

USB_DEVICE_HANDLE usbDeviceHandle;

// Start resume signaling.
USB_DEVICE_RemoteWakeupStart(usbDeviceHandle);

// As per section 7.1.7.7 of the USB specification, device can
// drive resume signaling for at least 1 millisecond but no
// more than 15 milliseconds.

APP_DelayMilliseconds(10);

// Stop resume signaling.
USB_DEVICE_RemoteWakeupStop(usbDeviceHandle);

Remarks

None.