USB Host PBHCI API#
USBH_PBHCI_ConfigureSOF_EventQty()#
Description#
Configures the quantity of Start-Of-Frame events.
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_ConfigureSOF_EventQty (CPU_INT16U sof_event_qty)
Arguments#
sof_event_qty
Quantity of start-of-frame events.
Returned Value#
None.
Notes / Warnings#
Calling this function is optional, if it is not called, the default value will be used.
This function MUST be called before the USB Host PBHCI module is initialized via the
USBH_PBHCI_Init()
function.
USBH_PBHCI_ConfigureSchedTaskStk()#
Description#
Configures the USB host PBHCI scheduler task's stack.
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_ConfigureSchedTaskStk (CPU_INT32U stk_size_elements,
void *p_stk)
Arguments#
stk_size_elements
Size, in stack elements, of the task's stack.
p_stk
Pointer to base of the task's stack. If DEF_NULL, stack will be allocated from KAL's memory segment.
Returned Value#
None.
Notes / Warnings#
Calling this function is optional, if it is not called, the default value will be used.
This function MUST be called before the USB Host PBHCI module is initialized via the
USBH_PBHCI_Init()
function.In order to change the priority of the USB host PBHCI scheduler task, use the function
USBH_PBHCI_SchedTaskPrioSet()
.
USBH_PBHCI_ConfigureMemSeg()#
Description#
Configures the memory segment to use when allocating control data and buffers.
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_ConfigureMemSeg (MEM_SEG *p_mem_seg)
Arguments#
p_mem_seg
Pointer to memory segment to use when allocating control data.
DEF_NULL
means general purpose heap segment.
Returned Value#
None.
Notes / Warnings#
Calling this function is optional, if it is not called, the default value will be used.
This function MUST be called before the PBHCI module is initialized via the
USBH_PBHCI_Init()
function.
USBH_PBHCI_Init()#
Description#
Initializes the Pipe-Based Host Controller Interface (PBHCI).
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_Init (USBH_PBHCI_CFG *p_cfg,
RTOS_TASK_CFG *p_sched_task_cfg,
MEM_SEG *p_mem_seg,
RTOS_ERR *p_err)
Arguments#
p_cfg
Pointer to the PBHCI configuration structure.
p_sched_task_cfg
Pointer to the configuration structure for scheduler task.
p_mem_seg
Pointer to the memory segment where to allocate PBHCI data. Passing DEF_NULL
will make the PBHCI use the general-purpose heap.
p_err
Pointer to the variable that will receive one of these return error codes from this function :
RTOS_ERR_NONE
RTOS_ERR_OS_ILLEGAL_RUN_TIME
RTOS_ERR_SEG_OVF
RTOS_ERR_BLK_ALLOC_CALLBACK
RTOS_ERR_POOL_EMPTY
RTOS_ERR_NOT_AVAIL
Returned Value#
None.
Notes / Warnings#
None.
USBH_PBHCI_SchedTaskPrioSet()#
Description#
Assigns a new priority to the USB host PBHCI scheduler task.
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_SchedTaskPrioSet(CPU_INT08U prio,
RTOS_ERR *p_err)
Arguments#
prio
New priority of the the scheduler task.
p_err
Pointer to the variable that will receive one of the following error code(s) from this function:
RTOS_ERR_NONE
RTOS_ERR_INVALID_ARG
Returned Value#
None.
Notes / Warnings#
None.
USBH_PBHCI_UnInit()#
Description#
Un-initializes Pipe-Based Host Controller Interface (PBHCI).
Files#
usbh_pbhci.h/usbh_pbhci.c
Prototype#
void USBH_PBHCI_UnInit (RTOS_ERR *p_err)
Arguments#
p_err
Pointer to the variable that will receive this return error code from this function :
RTOS_ERR_NONE
Returned Value#
None.
Notes / Warnings#
None.