USB Host MSC API#
USBH_MSC_ConfigureBufAlignOctets()#
Description#
Configures the alignment of the internal buffers.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_ConfigureBufAlignOctets (CPU_SIZE_T buf_align_octets)
Arguments#
buf_align_octets
Buffer alignment, in octets.
Returned Value#
None.
Notes / Warnings#
This function is optional, if it is not called, the default value will be used.
This function MUST be called before the MSC class is initialized via the
USBH_MSC_Init()
function.
USBH_MSC_ConfigureOptimizeSpdCfg()#
Description#
Sets the configurations required when optimize speed mode is enabled.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_ConfigureOptimizeSpdCfg(const USBH_MSC_CFG_OPTIMIZE_SPD *p_optimize_spd_cfg)
Arguments#
p_optimize_spd_cfg
Pointer to the structure containing the configurations for the optimize speed mode.
Returned Value#
None.
Notes / Warnings#
This function MUST be called before the MSC class is initialized via the
USBH_MSC_Init()
function.This function MUST be called when the
USBH_CFG_OPTIMIZE_SPD_EN
configuration is set toDEF_ENABLED
.
USBH_MSC_ConfigureInitAllocCfg()#
Description#
Sets the configurations required when allocation at initialization mode is enabled.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_ConfigureInitAllocCfg (const USBH_MSC_CFG_INIT_ALLOC *p_init_alloc_cfg)
Arguments#
p_init_alloc_cfg
Pointer to the structure containing the configurations for the allocation at initialization mode.
Returned Value#
None.
Notes / Warnings#
This function MUST be called before the MSC class is initialized via the
USBH_MSC_Init()
function.This function MUST be called when the
USBH_CFG_INIT_ALLOC_EN
configuration is set toDEF_ENABLED
.
USBH_MSC_ConfigureMemSeg()#
Description#
Configures the memory segment to use when allocating control data and buffers.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_ConfigureMemSeg (MEM_SEG *p_mem_seg,
MEM_SEG *p_mem_seg_buf)
Arguments#
p_mem_seg
Pointer to memory segment to use when allocating control data. Can be the same segment used for
p_mem_seg_buf
.DEF_NULL
means general purpose heap segment.
p_mem_seg_buf
Pointer to memory segment to use when allocating data buffers. Can be the same segment used for
p_mem_seg
.DEF_NULL
means general purpose heap segment.
Returned Value#
None.
Notes / Warnings#
This function is optional, if it is not called, the default value will be used.
This function MUST be called before the MSC class is initialized via the
USBH_MSC_Init()
function.
USBH_MSC_Init()#
Description#
Initializes The Mass Storage Class (MSC) driver.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_Init (USBH_MSC_CMD_BLK_FNCTS *p_cmd_blk_fncts,
RTOS_ERR *p_err)
Arguments#
p_cmd_blk_fncts
Pointer to the Command Block layer API structure. Content MUST be persistent.
p_err
Pointer to the variable that will receive one of these return error codes from this function :
RTOS_ERR_NONE
RTOS_ERR_SEG_OVF
RTOS_ERR_BLK_ALLOC_CALLBACK
Returned Value#
None.
Notes / Warnings#
MSC layer queries the Command Block layer for the maximum response buffer length that may be needed during the Data IN phase processing of the Bulk-Only Transport protocol.
USBH_MSC_StdReqTimeoutSet()#
Description#
Assigns a new timeout delay for the MSC standard requests.
Files#
usbh_msc.h/usbh_msc.c
Prototype#
void USBH_MSC_StdReqTimeoutSet (CPU_INT32U std_req_timeout_ms,
RTOS_ERR *p_err)
Arguments#
std_req_timeout_ms
New timeout, in milliseconds.
p_err
Pointer to the variable that will receive one of the following error code(s) from this function:
RTOS_ERR_NONE
Returned Value#
None.
Notes / Warnings#
None.