USBD ROM Stack
2.0
ROM based USB device stack
|
HID class API functions structure.This structure contains pointers to all the function exposed by HID function driver module. More...
Data Fields | |
uint32_t(* | GetMemSize )(USBD_HID_INIT_PARAM_T *param) |
ErrorCode_t(* | init )(USBD_HANDLE_T hUsb, USBD_HID_INIT_PARAM_T *param) |
HID class API functions structure.
This structure contains pointers to all the function exposed by HID function driver module.
uint32_t USBD_HID_API_T::GetMemSize |
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.
[in] | param | Structure containing HID function driver module initialization parameters. |
ErrorCode_t USBD_HID_API_T::init |
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.
[in] | hUsb | Handle to the USB device stack. |
[in,out] | param | Structure containing HID function driver module initialization parameters. |
LPC_OK | On success |
ERR_USBD_BAD_MEM_BUF | Memory buffer passed is not 4-byte aligned or smaller than required. |
ERR_API_INVALID_PARAM2 | Either HID_GetReport() or HID_SetReport() callback are not defined. |
ERR_USBD_BAD_DESC | HID_HID_DESCRIPTOR_TYPE is not defined immediately after interface descriptor. |
ERR_USBD_BAD_INTF_DESC | Wrong interface descriptor is passed. |
ERR_USBD_BAD_EP_DESC | Wrong endpoint descriptor is passed. |