USB Component
Version 6.6
MDK-Professional Middleware for USB Device and Host
|
User API reference of the USB Host Core. More...
Functions | |
usbStatus | USBH_Initialize (uint8_t ctrl) |
Initialize USB Host stack and controller. | |
usbStatus | USBH_Uninitialize (uint8_t ctrl) |
De-initialize USB Host stack and controller. | |
usbStatus | USBH_GetDeviceStatus (uint8_t device) |
Get status of USB Device. | |
User API reference of the USB Host Core.
usbStatus USBH_GetDeviceStatus | ( | uint8_t | device | ) |
Get status of USB Device.
[in] | device | index of USB Device. |
The function USBH_GetDeviceStatus checks if a device instance is connected and initialized.
The argument device specifies the instance of the device.
usbStatus USBH_Initialize | ( | uint8_t | ctrl | ) |
Initialize USB Host stack and controller.
[in] | ctrl | index of USB Host controller. |
The function USBH_Initialize initializes the USB Host Stack and the USB Host Controller Hardware and prepares the USB Host Controller to detect whether an USB device gets attached or detached from the USB bus. It starts a thread responsible for the USB Device enumeration process. Call this function before calling any other USB Host functions. The function does not initialize any non-USB Host hardware features.
Code Example
usbStatus USBH_Uninitialize | ( | uint8_t | ctrl | ) |
De-initialize USB Host stack and controller.
[in] | ctrl | index of USB Host controller. |
The function USBH_Uninitialize de-initializes the USB Host Stack and the USB Host Controller Hardware. It can be used if during the application run-time the USB Host Stack needs to be disabled for whatever reason (for example for lowering power consumption). Reinitialize the USB Host Stack only with USBH_Initialize.
Code Example