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
204 of 523
NXP Semiconductors
UM10462
Chapter 10: LPC11U3x/2x/1x USB on-chip drivers
HID_SetIdle
ErrorCode_t(* USBD_HID_INIT_PARAM::HID_SetIdle)(USBD_HANDLE_T hHid, USB_SETUP_PACKET *pSetup,
uint8_t idleTime)
Optional callback function to handle HID_REQUEST_SET_IDLE request.
The application software could provide this callback to handle HID_REQUEST_SET_IDLE requests
sent by the host. This callback is provided to applications to adjust timers associated with various
reports, which are sent to host over interrupt endpoint. The setup packet data (
Remark:
Applications which don't send reports on Interrupt endpoint or don't have idle time between
reports should set this data member to zero before calling the USBD_HID_API::Init().
Parameters:
1. hHid = Handle to HID function driver.
2. pSetup = Pointer to setup packet recived from host.
3. idleTime = Idle time to be set for the specified report.
Returns:
The call back should returns ErrorCode_t type to indicate success or error condition.
Return values:
1. LPC_OK = On success.
2. ERR_USBD_UNHANDLED = Event is not handled hence pass the event to next in line.
3. ERR_USBD_xxx = For other error conditions.
HID_SetProtocol
ErrorCode_t(* USBD_HID_INIT_PARAM::HID_SetProtocol)(USBD_HANDLE_T hHid, USB_SETUP_PACKET *pSetup,
uint8_t protocol)
Optional callback function to handle HID_REQUEST_SET_PROTOCOL request.
The application software could provide this callback to handle HID_REQUEST_SET_PROTOCOL
requests sent by the host. This callback is provided to applications to adjust modes of their code
between boot mode and report mode.
Remark:
Applications which don't support protocol modes should set this data member to zero
before calling the USBD_HID_API::Init().
Parameters:
1. hHid = Handle to HID function driver.
2. pSetup = Pointer to setup packet recived from host.
3. protocol = Protocol mode. 0 = Boot Protocol 1 = Report Protocol
Returns:
The call back should returns ErrorCode_t type to indicate success or error condition.
Return values:
1. LPC_OK = On success.
2. ERR_USBD_UNHANDLED = Event is not handled hence pass the event to next in line.
3. ERR_USBD_xxx = For other error conditions.
Table 207. USBD_HID_INIT_PARAM class structure
Member
Description