MPLAB Harmony USB Stack
|
This function returns the status of the client (ready or closed). The application can use this function to query the present state of a client. Some of the USB Device Layer functions do not have any effect if the client handle is invalid. The USB_DEVICE_ClientStatusGet function in such cases can be used for debugging or trouble shooting.
USB_DEVICE_CLIENT_STATUS USB_DEVICE_ClientStatusGet( 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 |
USB_DEVICE_CLIENT_STATUS type of client status.
The application may ordinarily not find the need to use this function. It can be used for troubleshooting or debugging purposes.
// This code example shows usage of the // USB_DEVICE_ClientStatusGet function. if(USB_DEVICE_CLIENT_STATUS_READY == USB_DEVICE_ClientStatusGet(usbDeviceHandle)) { // Client handle is valid. if(USB_DEVICE_IsSuspended(usbDeviceHandle)) { // Device is suspended. Do something here. } }
MPLAB Harmony USB Stack
|