UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
208 of 523
NXP Semiconductors
UM10462
Chapter 10: LPC11U3x/2x/1x USB on-chip drivers
Table 208. USBD_HW_API class structure
Member
Description
GetMemSize
uint32_t(*uint32_t USBD_HW_API::GetMemSize)(USBD_API_INIT_PARAM_T *param)
Function to determine the memory required by the USB device stack's DCD and core layers.
This function is called by application layer before calling pUsbApi->hw->GetMemSize
Remark:
Some memory areas are not accessible by all bus masters.
Parameters:
1. param = Structure containing USB device stack initialization parameters.
Returns:
Returns the required memory size in bytes.
Init
ErrorCode_t(*ErrorCode_t USBD_HW_API::Init)(USBD_HANDLE_T *phUsb, USB_CORE_DESCS_T *pDesc,
USBD_API_INIT_PARAM_T *param)
Function to initialize USB device stack's DCD and core layers.
This function is called by application layer to initialize USB hardware and core layers. On successful
initialization the function returns a handle to USB device stack which should be passed to the rest of
the functions.
Parameters:
1. phUsb = Pointer to the USB device stack handle of type USBD_HANDLE_T.
2. param = Structure containing USB device stack initialization parameters.
Returns:
Returns ErrorCode_t type to indicate success or error condition.
Return values:
1. LPC_OK(0) = On success
2. ERR_USBD_BAD_MEM_BUF(0x0004000b) = When insufficient memory buffer is passed or
memory is not aligned on 2048 boundary.
Connect
void(*void USBD_HW_API::Connect)(USBD_HANDLE_T hUsb, uint32_t con)
Function to make USB device visible/invisible on the USB bus.
This function is called after the USB initialization. This function uses the soft connect feature to make
the device visible on the USB bus. This function is called only after the application is ready to handle
the USB data. The enumeration process is started by the host after the device detection. The driver
handles the enumeration process according to the USB descriptors passed in the USB initialization
function.
Parameters:
1. hUsb = Handle to the USB device stack.
2. con = States whether to connect (1) or to disconnect (0).
Returns:
Nothing.