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
674 of 1269
NXP Semiconductors
UM10503
Chapter 25: LPC43xx USB API
25.5.36 USBD_MSC_INIT_PARAM
Mass Storage class function driver initialization parameter data structure.
Table 527. USBD_MSC_API class structure
Member
Description
GetMemSize
uint32_t(*uint32_t USBD_MSC_API::GetMemSize)(USBD_MSC_INIT_PARAM_T *param)
Function to determine the memory required by the MSC function driver module.
This function is called by application layer before calling pUsbApi->msc->Init(), to allocate
memory used by MSC 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 MSC function driver module initialization parameters.
Returns:
Returns the required memory size in bytes.
init
ErrorCode_t(*ErrorCode_t USBD_MSC_API::init)(USBD_HANDLE_T hUsb, USBD_MSC_INIT_PARAM_T
*param)
Function to initialize MSC function driver module.
This function is called by application layer to initialize MSC function driver module.
Parameters:
1. hUsb = Handle to the USB device stack.
2. param = Structure containing MSC 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 MSC_Write() or MSC_Read() or MSC_Verify()
callbacks are not defined.
4. ERR_USBD_BAD_INTF_DESC = Wrong interface descriptor is passed.
5. ERR_USBD_BAD_EP_DESC = Wrong endpoint descriptor is passed.