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
215 of 523
NXP Semiconductors
UM10462
Chapter 10: LPC11U3x/2x/1x USB on-chip drivers
10.5.35 USBD_MSC_API
MSC class API functions structure.This module exposes functions which interact directly
with USB device controller hardware.
WriteEP
uint32_t(*uint32_t USBD_HW_API::WriteEP)(USBD_HANDLE_T hUsb, uint32_t EPNum, uint8_t *pData, uint32_t cnt)
Function to write data to be sent on the requested endpoint.
This function is called by USB stack and the application layer to send data on the requested endpoint.
Parameters:
1. hUsb = Handle to the USB device stack.
2. EPNum = Endpoint number as per USB specification. ie. An EP1_IN is represented by 0x81
number.
3. pData = Pointer to the data buffer from where data is to be copied.
4. cnt = Number of bytes to write.
Returns:
Returns the number of bytes written.
WakeUp
void(*void USBD_HW_API::WakeUp)(USBD_HANDLE_T hUsb)
Function to generate resume signaling on bus for remote host wake-up.
This function is called by application layer to remotely wake up host controller when system is in
suspend state. Application should indicate this remote wake up capability by setting
USB_CONFIG_REMOTE_WAKEUP in bmAttributes of Configuration Descriptor. Also this routine will
generate resume signalling only if host enables USB_FEATURE_REMOTE_WAKEUP by sending
SET_FEATURE request before suspending the bus.
Parameters:
1. hUsb = Handle to the USB device stack.
Returns:
Nothing.
EnableEvent
ErrorCode_t(* USBD_HW_API::EnableEvent)(USBD_HANDLE_T hUsb, uint32_t EPNum, uint32_t event_type, uint32_t
enable)
Parameters:
1. hUsb = Handle to the USB device stack.
2. EPNum = Endpoint number corresponding to the event as per USB specification. ie. An EP1_IN
isrepresented by 0x81 number. For device events set this param to 0x0.
3. event = Type of endpoint event. See USBD_EVENT_T for more details.
4. enable = 1 - enable event, 0 - disable event.Returns:Returns ErrorCode_t type to indicate success
or error condition.Return values:1. LPC_OK(0) = - On success2.
ERR_USBD_INVALID_REQ(0x00040001) = - Invalid event type.
Table 208. USBD_HW_API class structure
Member
Description