UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
659 of 1269
NXP Semiconductors
UM10503
Chapter 25: LPC43xx USB API
25.5.33 USBD_HID_INIT_PARAM
USB descriptors data structure.
Table 524. USBD_HID_API class structure
Member
Description
GetMemSize
uint32_t(*uint32_t USBD_HID_API::GetMemSize)(USBD_HID_INIT_PARAM_T *param)
Function to determine the memory required by the HID function driver module.
This function is called by application layer before calling pUsbApi->hid->Init(), to allocate memory used by
HID function driver module. The application should allocate the memory which is accessible by USB
controller/DMA controller.
Remark:
Some memory areas are not accessible by all bus masters.
Parameters:
1. param = Structure containing HID function driver module initialization parameters.
Returns:
Returns the required memory size in bytes.
init
ErrorCode_t(*ErrorCode_t USBD_HID_API::init)(USBD_HANDLE_T hUsb, USBD_HID_INIT_PARAM_T *param)
Function to initialize HID function driver module.
This function is called by application layer to initialize HID function driver module. On successful
initialization the function returns a handle to HID function driver module in passed param structure.
Parameters:
1. hUsb = Handle to the USB device stack.
2. param = Structure containing HID function driver module initialization parameters.
Returns:
Returns ErrorCode_t type to indicate success or error condition.
Return values:
1. LPC_OK = On success
2. ERR_USBD_BAD_MEM_BUF = Memory buffer passed is not 4-byte aligned or smaller than
required.
3. ERR_API_INVALID_PARAM2 = Either HID_GetReport() or HID_SetReport() callback are not
defined.
4. ERR_USBD_BAD_DESC = HID_HID_DESCRIPTOR_TYPE is not defined immediately after
interface descriptor.
5. ERR_USBD_BAD_INTF_DESC = Wrong interface descriptor is passed.
6. ERR_USBD_BAD_EP_DESC = Wrong endpoint descriptor is passed.