![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 782](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827782.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
782 of 1441
NXP Semiconductors
UM10503
Chapter 27: LPC43xx/LPC43Sxx USB API
27.5.27 USBD_CDC_API
CDC class API functions structure.This module exposes functions which interact directly
with USB device controller hardware.
USB_Configure_Event
USB_CB_T USBD_API_INIT_PARAM::USB_Configure_Event
Event for USB configuration number changed. This event fires when a the USB host changes the
selected configuration number. On receiving configuration change request from host, the stack
enables/configures the endpoints needed by the new configuration before calling this callback
function.
Remark:
This event is called from USB_ISR context and hence is time-critical. Having delays in
this callback will prevent the device from enumerating correctly or operate properly.
USB_Interface_Event
USB_CB_T USBD_API_INIT_PARAM::USB_Interface_Event
Event for USB interface setting changed. This event fires when a the USB host changes the
interface setting to one of alternate interface settings. On receiving interface change request from
host, the stack enables/configures the endpoints needed by the new alternate interface setting
before calling this callback function.
Remark:
This event is called from USB_ISR context and hence is time-critical. Having delays in
this callback will prevent the device from enumerating correctly or operate properly.
USB_Feature_Event
USB_CB_T USBD_API_INIT_PARAM::USB_Feature_Event
Event for USB feature changed. This event fires when a the USB host send set/clear feature
request. The stack handles this request for USB_FEATURE_REMOTE_WAKEUP,
USB_FEATURE_TEST_MODE and USB_FEATURE_ENDPOINT_STALL features only. On
receiving feature request from host, the stack handle the request appropriately and then calls this
callback function.
Remark:
This event is called from USB_ISR context and hence is time-critical. Having delays in
this callback will prevent the device from enumerating correctly or operate properly.
virt_to_phys
uint32_t(* USBD_API_INIT_PARAM::virt_to_phys)(void *vaddr)
Reserved parameter for future use. should be set to zero.
cache_flush
void(* USBD_API_INIT_PARAM::cache_flush)(uint32_t *start_adr, uint32_t *end_adr)
Reserved parameter for future use. should be set to zero.
Table 588. USBD_API_INIT_PARAM class structure
Member
Description
Table 589. USBD_CDC_API class structure
Member
Description
GetMemSize
uint32_t(*uint32_t USBD_CDC_API::GetMemSize)(USBD_CDC_INIT_PARAM_T *param)
Function to determine the memory required by the CDC function driver module.
This function is called by application layer before calling pUsbApi->CDC->Init(), to allocate memory
used by CDC 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 CDC function driver module initialization parameters.
Returns:
Returns the required memory size in bytes.