MPLAB Harmony USB Stack
|
This function returns true is the device is presently in suspended state. The application can use this function in conjunction with the USB_DEVICE_StateGet function to obtain the detailed state of the device (such as addressed and suspended, configured and suspended etc.). The Device Layer also provides the macro USB_DEVICE_EVENT_SUSPENDED event to indicate entry into suspend state.
bool USB_DEVICE_IsSuspended( USB_DEVICE_HANDLE usbDeviceHandle );
The USB Device Layer must have been initialized and opened before calling this function.
Parameters |
Description |
usbDeviceHandle |
Pointer to the Device Layer Handle that is returned from USB_DEVICE_Open |
Returns true if the device is suspended.
None.
// This code example shows how the application // can find out if the device is in a configured but suspended state. if(USB_DEVICE_IsSuspended(usbDeviceHandle)) { // Device is in a suspended state. if(USB_DEVICE_STATE_CONFIGURED == USB_DEVICE_StateGet(usbDeviceHandle)) { // This means the device is in configured and suspended state. } }
MPLAB Harmony USB Stack
|