USBD ROM Stack  1.0
ROM based USB device stack
USBD_MSC_API_T Struct Reference

MSC class API functions structure.This module exposes functions which interact directly with USB device controller hardware. More...

#include <mw_usbd/mw_usbd_mscuser.h>

Data Fields

uint32_t(* GetMemSize )(USBD_MSC_INIT_PARAM_T *param)
ErrorCode_t(* init )(USBD_HANDLE_T hUsb, USBD_MSC_INIT_PARAM_T *param)

Detailed Description

MSC class API functions structure.

This module exposes functions which interact directly with USB device controller hardware.


Field Documentation

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.

Note:
Some memory areas are not accessible by all bus masters.
Parameters:
[in]paramStructure containing MSC function driver module initialization parameters.
Returns:
Returns the required memory size in bytes.

Function to initialize MSC function driver module.

This function is called by application layer to initialize MSC function driver module.

Parameters:
[in]hUsbHandle to the USB device stack.
[in,out]paramStructure containing MSC function driver module initialization parameters.
Returns:
Returns ErrorCode_t type to indicate success or error condition.
Return values:
LPC_OKOn success
ERR_USBD_BAD_MEM_BUFMemory buffer passed is not 4-byte aligned or smaller than required.
ERR_API_INVALID_PARAM2Either MSC_Write() or MSC_Read() or MSC_Verify() callbacks are not defined.
ERR_USBD_BAD_INTF_DESCWrong interface descriptor is passed.
ERR_USBD_BAD_EP_DESCWrong endpoint descriptor is passed.

The documentation for this struct was generated from the following file: