File nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

(C) COPYRIGHT 2010 STMicroelectronics ******************** * File Name : otgd_fs_cal.c * Author : STMicroelectronics * Version : V3.1.1 * Date : 04/07/2010 * Description : OTG FS Device Core Access Layer interface. ******************************************************************************** * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.


Included Files


Global Variable core_regs

USB_OTG_CORE_REGS core_regs
Visible in:   nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Used in: EnableCommonInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  GetMode() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  InitDevSpeed() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_CoreInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_CoreInitDev() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_CoreReset() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_Dev_GetEPStatus() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_Dev_ResetRemoteWakeup() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_Dev_SetEPStatus() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_Dev_SetRemoteWakeup() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_DisableGlobalInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EP0Activate() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EP0StartXfer() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPActivate() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPClearStall() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPDeactivate() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPSetStall() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPStartXfer() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EnableDevInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EnableGlobalInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_FlushRxFifo() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_FlushTxFifo() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_PhyInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadCoreItr() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadDevAllInEPItr() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadDevAllOutEp_itr() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadDevOutEP_itr() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadOtgItr() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_ReadPacket() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_SetAddress() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_WritePacket() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  SetID() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function IsDeviceMode()

uint8_t IsDeviceMode ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: GetMode() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function IsHostMode()

uint8_t IsHostMode ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: GetMode() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_CoreInit()

USB_OTG_Status OTGD_FS_CoreInit ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: OTGD_FS_CoreReset() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_PhyInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  SetID() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_CoreInitDev()

USB_OTG_Status OTGD_FS_CoreInitDev ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: InitDevSpeed() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EnableDevInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_FlushRxFifo() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_FlushTxFifo() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_Dev_GetEPStatus()

uint32_t OTGD_FS_Dev_GetEPStatus ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_Dev_ResetRemoteWakeup()

void OTGD_FS_Dev_ResetRemoteWakeup ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_Dev_SetEPStatus()

void OTGD_FS_Dev_SetEPStatus ( USB_OTG_EP* ep, uint32_t Status )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: OTGD_FS_EPClearStall() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  OTGD_FS_EPSetStall() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_Dev_SetRemoteWakeup()

void OTGD_FS_Dev_SetRemoteWakeup ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_DisableGlobalInt()

USB_OTG_Status OTGD_FS_DisableGlobalInt ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EP0Activate()

USB_OTG_Status OTGD_FS_EP0Activate ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EP0StartXfer()

USB_OTG_Status OTGD_FS_EP0StartXfer ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EPActivate()

USB_OTG_Status OTGD_FS_EPActivate ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EPClearStall()

USB_OTG_Status OTGD_FS_EPClearStall ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Called by: OTGD_FS_Dev_SetEPStatus() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EPDeactivate()

USB_OTG_Status OTGD_FS_EPDeactivate ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EPSetStall()

USB_OTG_Status OTGD_FS_EPSetStall ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Called by: OTGD_FS_Dev_SetEPStatus() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EPStartXfer()

USB_OTG_Status OTGD_FS_EPStartXfer ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EnableDevInt()

USB_OTG_Status OTGD_FS_EnableDevInt ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: EnableCommonInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Called by: OTGD_FS_CoreInitDev() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_EnableGlobalInt()

USB_OTG_Status OTGD_FS_EnableGlobalInt ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_FlushRxFifo()

USB_OTG_Status OTGD_FS_FlushRxFifo ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: NutMicroDelay()
Called by: OTGD_FS_CoreInitDev() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_FlushTxFifo()

USB_OTG_Status OTGD_FS_FlushTxFifo ( uint32_t num )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: NutMicroDelay()
Called by: OTGD_FS_CoreInitDev() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_PhyInit()

USB_OTG_Status OTGD_FS_PhyInit ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
Calls: NutSleep()
Called by: OTGD_FS_CoreInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadCoreItr()

uint32_t OTGD_FS_ReadCoreItr ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadDevAllInEPItr()

uint32_t OTGD_FS_ReadDevAllInEPItr ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadDevAllOutEp_itr()

uint32_t OTGD_FS_ReadDevAllOutEp_itr ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadDevOutEP_itr()

uint32_t OTGD_FS_ReadDevOutEP_itr ( USB_OTG_EP* ep )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadOtgItr()

uint32_t OTGD_FS_ReadOtgItr ( void )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_ReadPacket()

void* OTGD_FS_ReadPacket ( uint8_t* dest, uint16_t bytes )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_SetAddress()

USB_OTG_Status OTGD_FS_SetAddress ( uint32_t BaseAddress )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function OTGD_FS_WritePacket()

USB_OTG_Status OTGD_FS_WritePacket ( uint8_t* src, uint8_t ch_ep_num, uint16_t bytes )
Prototyped in: nut/include/dev/usb_stm32/otgd_fs_cal.h
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Global Function SetID()

USB_OTG_Status SetID ( void )
Prototyped in: nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Calls: NutSleep()
Called by: OTGD_FS_CoreInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Local Function EnableCommonInt()

static void EnableCommonInt ( void )
Prototyped in: nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Called by: OTGD_FS_EnableDevInt() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Local Function GetMode()

static uint32_t GetMode ( void )
Prototyped in: nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Called by: IsDeviceMode() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
  IsHostMode() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Local Function InitDevSpeed()

static void InitDevSpeed ( void )
Called by: OTGD_FS_CoreInitDev() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c

Local Function OTGD_FS_CoreReset()

static USB_OTG_Status OTGD_FS_CoreReset ( void )
Prototyped in: nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
Calls: NutMicroDelay()
Called by: OTGD_FS_CoreInit() nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c
References Variables: core_regs nut/arch/cm3/dev/stm/stm32_otgd_fs_cal.c