![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
USB device stack initilization parameter data structure.
This data structure is used to pass initialization parameters to the USB device stack's init function.
Definition at line 64 of file usbd_api.h.
#include "usbd_api.h"
Data Fields | |
| uint32_t | usb_reg_base |
| uint32_t | mem_base |
| uint32_t | mem_size |
| uint8_t | max_num_ep |
| USB_CB_T | USB_Reset_Event |
| USB_CB_T | USB_Suspend_Event |
| USB_CB_T | USB_Resume_Event |
| USB_CB_T | USB_WakeUp_Event |
| USB_CB_T | USB_SOF_Event |
| USB_PARAM_CB_T | USB_WakeUpCfg |
| USB_PARAM_CB_T | USB_Power_Event |
| USB_PARAM_CB_T | USB_Error_Event |
| USB_CB_T | USB_Configure_Event |
| USB_CB_T | USB_Interface_Event |
| USB_CB_T | USB_Feature_Event |
| uint32_t(* | virt_to_phys )(void *vaddr) |
| void(* | cache_flush )(uint32_t *start_adr, uint32_t *end_adr) |
| uint8_t | pad0 [3] |
| USB_CB_T | reserved_sbz |
Reserved parameter for future use. should be set to zero.
Definition at line 89 of file usbd_api.h.
| uint8_t max_num_ep |
max number of endpoints supported by the USB device controller instance (specified by usb_reg_base field) to which this instance of stack is attached.
Definition at line 69 of file usbd_api.h.
| uint32_t mem_base |
Base memory location from where the stack can allocate data and buffers.
Base memory location from where the stack can allocate data and buffers.
Definition at line 67 of file usbd_api.h.
| uint32_t mem_size |
The size of memory buffer which stack can use.
The size of memory buffer which stack can use.
Definition at line 68 of file usbd_api.h.
| uint8_t pad0[3] |
Definition at line 161 of file usbd_core.h.
| USB_CB_T reserved_sbz |
Reserved parameter should be set to zero.
Definition at line 194 of file usbd_core.h.
| USB_CB_T USB_Configure_Event |
Event for USB configuration number changed. This event fires when a the USB host changes the selected configuration number. On receiving configuration change request from host, the stack enables/configures the endpoints needed by the new configuration before calling this callback function.
Event for USB configuration number changed. This event fires when a the USB host changes the selected configuration number. On receiving configuration change request from host, the stack enables/configures the endpoints needed by the new configuration before calling this callback function.
Definition at line 83 of file usbd_api.h.
| USB_PARAM_CB_T USB_Error_Event |
Event for error condition. This event fires when USB device controller detect an error condition in the system.
| [in] | hUsb | Handle to the USB device stack. |
| [in] | param1 | USB device interrupt status register. |
Event for error condition. This event fires when USB device controller detect an error condition in the system.
| hUsb | Handle to the USB device stack. |
| param1 | USB device interrupt status register. |
Definition at line 80 of file usbd_api.h.
| USB_CB_T USB_Feature_Event |
Event for USB feature changed. This event fires when a the USB host send set/clear feature request. The stack handles this request for USB_FEATURE_REMOTE_WAKEUP, USB_FEATURE_TEST_MODE and USB_FEATURE_ENDPOINT_STALL features only. On receiving feature request from host, the stack handle the request appropriately and then calls this callback function.
Event for USB feature changed. This event fires when a the USB host send set/clear feature request. The stack handles this request for USB_FEATURE_REMOTE_WAKEUP, USB_FEATURE_TEST_MODE and USB_FEATURE_ENDPOINT_STALL features only. On receiving feature request from host, the stack handle the request appropriately and then calls this callback function.
Definition at line 85 of file usbd_api.h.
| USB_CB_T USB_Interface_Event |
Event for USB interface setting changed. This event fires when a the USB host changes the interface setting to one of alternate interface settings. On receiving interface change request from host, the stack enables/configures the endpoints needed by the new alternate interface setting before calling this callback function.
Event for USB interface setting changed. This event fires when a the USB host changes the interface setting to one of alternate interface settings. On receiving interface change request from host, the stack enables/configures the endpoints needed by the new alternate interface setting before calling this callback function.
Definition at line 84 of file usbd_api.h.
| USB_PARAM_CB_T USB_Power_Event |
Reserved parameter should be set to zero.
Definition at line 79 of file usbd_api.h.
| uint32_t usb_reg_base |
USB device controller's base register address.
Definition at line 66 of file usbd_api.h.
| USB_CB_T USB_Reset_Event |
Event for USB interface reset. This event fires when the USB host requests that the device reset its interface. This event fires after the control endpoint has been automatically configured by the library.
Event for USB interface reset. This event fires when the USB host requests that the device reset its interface. This event fires after the control endpoint has been automatically configured by the library.
Definition at line 72 of file usbd_api.h.
| USB_CB_T USB_Resume_Event |
Event for USB wake up or resume. This event fires when a the USB device interface is suspended and the host wakes up the device by supplying Start Of Frame pulses. This is generally hooked to pull the user application out of a low power state and back into normal operating mode.
Event for USB wake up or resume. This event fires when a the USB device interface is suspended and the host wakes up the device by supplying Start Of Frame pulses. This is generally hooked to pull the user application out of a low power state and back into normal operating mode.
Definition at line 74 of file usbd_api.h.
| USB_CB_T USB_SOF_Event |
Event for USB Start Of Frame detection, when enabled. This event fires at the start of each USB frame, once per millisecond in full-speed mode or once per 125 microseconds in high-speed mode, and is synchronized to the USB bus.
This event is time-critical; it is run once per millisecond (full-speed mode) and thus long handlers will significantly degrade device performance. This event should only be enabled when needed to reduce device wake-ups.
Event for USB Start Of Frame detection, when enabled. This event fires at the start of each USB frame, once per millisecond in full-speed mode or once per 125 microseconds in high-speed mode, and is synchronized to the USB bus.
This event is time-critical; it is run once per millisecond (full-speed mode) and thus long handlers will significantly degrade device performance. This event should only be enabled when needed to reduce device wake-ups.
Definition at line 76 of file usbd_api.h.
| USB_CB_T USB_Suspend_Event |
Event for USB suspend. This event fires when the USB host suspends the device by halting its transmission of Start Of Frame pulses to the device. This is generally hooked in order to move the device over to a low power state until the host wakes up the device.
Event for USB suspend. This event fires when the USB host suspends the device by halting its transmission of Start Of Frame pulses to the device. This is generally hooked in order to move the device over to a low power state until the host wakes up the device.
Definition at line 73 of file usbd_api.h.
| USB_CB_T USB_WakeUp_Event |
Definition at line 75 of file usbd_api.h.
| USB_PARAM_CB_T USB_WakeUpCfg |
Event for remote wakeup configururation, when enabled. This event fires when the USB host request the device to configure itself for remote wake-up capability. The USB host sends this request to device which report remote wakeup capable in their device descriptors, before going to low-power state. The application layer should implement this callback if they have any special on board circuit to trigerr remote wake up event. Also application can use this callback to differntiate the following SUSPEND event is caused by cable plug-out or host SUSPEND request. The device can wakeup host only after reciving this callback and remote wakeup feature is enabled by host. To signal remote wakeup the device has to generate resume signaling on bus by calling usapi.hw->WakeUp() routine.
| [in] | hUsb | Handle to the USB device stack. |
| [in] | param1 | When 0 - Clear the wakeup configuration, 1 - Enable the wake-up configuration. |
Event for remote wakeup configururation, when enabled. This event fires when the USB host request the device to configure itself for remote wake-up capability. The USB host sends this request to device which report remote wakeup capable in their device descriptors, before going to low-power state. The application layer should implement this callback if they have any special on board circuit to trigerr remote wake up event.
This event is time-critical; it is run once per millisecond (full-speed mode) and thus long handlers will significantly degrade device performance.
| hUsb | Handle to the USB device stack. |
| param1 | When 0 - Clear the wakeup configuration, 1 - Enable the wake-up configuration. |
Definition at line 78 of file usbd_api.h.
| uint32_t(* virt_to_phys)(void *vaddr) |
Reserved parameter for future use. should be set to zero.
Definition at line 88 of file usbd_api.h.