usbdGetFrame
Purpose
Gets the frame number and current speed for isochronous endpoints.
Syntax
#include <usbdi.h>
USBstatus usbdGetDescriptors(handle, pFrame, pSpeed)
USBhandle handle;
uint16_t *pFrame;
uint8_t *pSpeed;Parameter
| Item | Description |
|---|---|
| handle | Handle of open USB logical device that is returned by the USBD_OPEN_DEVICE fp_ioctl. |
| pFrame | Location to get the device-specific details such as the address, configuration number, and interface number. |
| pSpeed | Location to store current speed. |
Description
The USB client driver uses this function to obtain the current frame number for the host controller to which the device is connected. This function is used for the isochronous pipes.
If the device is full speed, then this request saves the current frame number at the location that is specified by pFrame and the value USBD_FULL_SPEED at the location that is specified by pSpeed. If the device is high speed, this request saves the current microframe number at the location that is specified by pFrame and the value USBD_HIGH_SPEED at the location that is specified by pSpeed.
The pSpeed pointer might be NULL if the client driver does not need to know the value.
The value USBD_X_Unimplemented (defined in /usr/include/sys/usbdi.h file) are returned if isochronous is not supported in the host controller driver to which the device is attached.
Execution Environment
This function might be called from kernel process environment only.
Return Values
| Value | Description |
|---|---|
| USBD_SUCCESS | Success |
| All others | Failure |