USBD ROM Stack
2.0
ROM based USB device stack
|
MSC class API functions structure.This module exposes functions which interact directly with USB device controller hardware. More...
Data Fields | |
uint32_t(* | GetMemSize )(USBD_MSC_INIT_PARAM_T *param) |
ErrorCode_t(* | init )(USBD_HANDLE_T hUsb, USBD_MSC_INIT_PARAM_T *param) |
MSC class API functions structure.
This module exposes functions which interact directly with USB device controller hardware.
uint32_t USBD_MSC_API_T::GetMemSize |
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.
[in] | param | Structure containing MSC function driver module initialization parameters. |
ErrorCode_t USBD_MSC_API_T::init |
Function to initialize MSC function driver module.
This function is called by application layer to initialize MSC function driver module.
[in] | hUsb | Handle to the USB device stack. |
[in,out] | param | Structure containing MSC 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 MSC_Write() or MSC_Read() or MSC_Verify() callbacks are not defined. |
ERR_USBD_BAD_INTF_DESC | Wrong interface descriptor is passed. |
ERR_USBD_BAD_EP_DESC | Wrong endpoint descriptor is passed. |