 | RL-ARM User's Guide |  |
|
|
| usbh_get_last_error| Summary |
#include <rl_usb.h>
U32 usbh_get_last_error (
U8 ctrl
);
| | Description | The usbh_get_last_error function returns the last error that happened on requested ctrl USB Host Controller. The usbh_get_last_error function is part of the RL-USB-Host software stack. | | Return Value | The usbh_get_last_error function returns one of the following manifest constants. - ERROR_SUCCESS
Success. - ERROR_USBH_HCI
Indicates that requested host controller instance is invalid. - ERROR_USBH_HCD
Indicates that requested host controller driver instance is invalid. - ERROR_USBH_DCI
Indicates that requested device class instance is invalid. - ERROR_USBH_DCD
Indicates that requested device class driver instance is invalid. - ERROR_USBH_MEM_INIT
Indicates that memory pool was not properly initialized. - ERROR_USBH_MEM_ALLOC
Indicates that memory block was not allocated. - ERROR_USBH_MEM_DEALLOC
Indicates that memory block was not deallocated. - ERROR_USBH_PINS_CONFIG
Indicates that pins were not configured. - ERROR_USBH_INIT
Indicates that host controller hardware was not initialized. - ERROR_USBH_PORT_POWER
Indicates that port was not powered on/off. - ERROR_USBH_PORT_RESET
Indicates that port was not reset. - ERROR_USBH_EP
Indicates that endpoint handle was invalid. - ERROR_USBH_EP_ADD
Indicates that endpoint was not added. - ERROR_USBH_EP_CONFIG
Indicates that endpoint was not configured. - ERROR_USBH_EP_REMOVE
Indicates that endpoint was not removed. - ERROR_USBH_URB
Indicates that URB handle was invalid. - ERROR_USBH_URB_SUBMIT
Indicates that transfer was not submitted. - ERROR_USBH_URB_CANCEL
Indicates that transfer was not cancelled. - ERROR_USBH_URB_TRANSFER
Indicates that transfer has failed due to transfer error. - ERROR_USBH_URB_TOUT
Indicates that transfer has failed due to timeout. - ERROR_USBH_ENUMERATE
Indicates that connected device was not enumerated. - ERROR_USBH_UNINIT_DEVS
Indicates that disconnected device resources were not uninitialized. - ERROR_USBH_MSC
Indicates that requested mass storage device instance is invalid. - ERROR_USBH_MSC_SIG
Indicates that mass storage device returned wrong signature in command status word. - ERROR_USBH_MSC_TAG
Indicates that mass storage device returned wrong tag in command status word. - ERROR_USBH_MSC_RESID
Indicates that mass storage device returned residue in command status word. - ERROR_USBH_HID
Indicates that requested human interface device instance is invalid. - ERROR_USBH_CLS
Indicates that requested custom device instance is invalid. - ERROR_USBH_CLS_UNKNOWN
Indicates that enumerated device is of unknown class.
| | See Also | usbh_engine, usbh_engine_all, usbh_get_error_string, usbh_init, usbh_init_all, usbh_uninit, usbh_uninit_all | | Example |
#include <rl_usb.h>
int main (void) {
..
if (usbh_init(0) == __FAIL) {
switch (usbh_get_last_error(0)) {
case ERROR_USBH_INIT:
...
..
}
..
}
|
|
|