PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
UsbHostClassSupervisor.c File Reference
Include dependency graph for UsbHostClassSupervisor.c:

Go to the source code of this file.

Macros

#define __USBHOSTCLASSSUPERVISOR_C__
 
#define USBCLASSSUPERVISOR_INSTANCE_COUNT   (uint32_t)(sizeof(m_astcUsbClassSupervisorInstanceDataLut) / sizeof(m_astcUsbClassSupervisorInstanceDataLut[0]))
 Macro to return the number of enabled MFS instances. More...
 

Functions

static
stc_usbclasssupervisor_intern_data_t * 
UsbClassSupervisorGetInternDataPtr (stc_usbn_t *pstcUsb)
 Return the internal data for a certain USB instance. More...
 
void UsbClassSupervisor_Init (stc_usbn_t *pstcUsb)
 
void UsbClassSupervisor_Deinit (stc_usbn_t *pstcUsb)
 
void UsbClassSupervisor_SysTickHandler (stc_usbn_t *pstcUsb)
 
void UsbClassSupervisor_SetErrorHandler (stc_usbn_t *pstcUsb, void(*Handler)(stc_usbn_t *pstcUsb, UsbClassHandler_t stcMatchClass))
 
UsbClassDriver_t UsbClassSupervisor_GetActiveDriver (stc_usbn_t *pstcUsb)
 
void ReturnedDeviceDescriptor (stc_usbn_t *pstcUsb, uint8_t *pu8Buffer, uint32_t u32DataSize)
 
void ReturnedConfigurationDescriptor (stc_usbn_t *pstcUsb, uint8_t *pu8Buffer, uint32_t u32DataSize)
 
boolean_t UsbSupervisor_UsbClassMatch (UsbClassHandler_t *stcA, UsbClassHandler_t *stcB)
 

Variables

stc_usbclasssupervisorn_instance_data_t m_astcUsbClassSupervisorInstanceDataLut []
 Look-up table for all enabled MFS instances and their internal data. More...
 

Detailed Description

Part of USB Host Driver Module

History:

  • 2011-03-30 1.0 MSc First version
  • 2012-06-01 2.0 MSc New Version for use with M3 L3 USB driver
  • 2013-10-14 2.1 MSc PDL support added

Definition in file UsbHostClassSupervisor.c.

Macro Definition Documentation

#define __USBHOSTCLASSSUPERVISOR_C__

Definition at line 57 of file UsbHostClassSupervisor.c.

#define USBCLASSSUPERVISOR_INSTANCE_COUNT   (uint32_t)(sizeof(m_astcUsbClassSupervisorInstanceDataLut) / sizeof(m_astcUsbClassSupervisorInstanceDataLut[0]))

Macro to return the number of enabled MFS instances.

Definition at line 97 of file UsbHostClassSupervisor.c.

Referenced by UsbClassSupervisorGetInternDataPtr().

Function Documentation

void UsbClassSupervisor_Deinit ( stc_usbn_t *  pstcUsb)
UsbClassDriver_t UsbClassSupervisor_GetActiveDriver ( stc_usbn_t *  pstcUsb)

Definition at line 229 of file UsbHostClassSupervisor.c.

References stc_usbclasssupervisor_intern_data::CurrentDriver, and UsbClassSupervisorGetInternDataPtr().

Here is the call graph for this function:

void UsbClassSupervisor_SetErrorHandler ( stc_usbn_t *  pstcUsb,
void(*)(stc_usbn_t *pstcUsb, UsbClassHandler_t stcMatchClass)  Handler 
)

Definition at line 222 of file UsbHostClassSupervisor.c.

References stc_usbclasssupervisor_intern_data::InternalErrorHandler, and UsbClassSupervisorGetInternDataPtr().

Here is the call graph for this function:

static stc_usbclasssupervisor_intern_data_t* UsbClassSupervisorGetInternDataPtr ( stc_usbn_t *  pstcUsb)
static

Return the internal data for a certain USB instance.

Parameters
pstcUsbPointer to USB instance
Returns
Pointer to internal data or NULL if instance is not enabled (or not known)

Definition at line 123 of file UsbHostClassSupervisor.c.

References stc_usbclasssupervisorn_instance_data::stcInternData, and USBCLASSSUPERVISOR_INSTANCE_COUNT.

Referenced by ReturnedConfigurationDescriptor(), ReturnedDeviceDescriptor(), UsbClassSupervisor_Deinit(), UsbClassSupervisor_GetActiveDriver(), UsbClassSupervisor_Init(), UsbClassSupervisor_SetErrorHandler(), and UsbClassSupervisor_SysTickHandler().

Here is the caller graph for this function:

Variable Documentation

stc_usbclasssupervisorn_instance_data_t m_astcUsbClassSupervisorInstanceDataLut[]
Initial value:
=
{
}

Look-up table for all enabled MFS instances and their internal data.

Definition at line 100 of file UsbHostClassSupervisor.c.