Prusa MINI Firmware overview
usbh_core.c File Reference

This file implements the functions for the core state machine process the enumeration and the control transfer process. More...

#include "usbh_core.h"

Macros

#define USBH_ADDRESS_DEFAULT   0
 
#define USBH_ADDRESS_ASSIGNED   1
 
#define USBH_MPS_DEFAULT   0x40
 

Functions

static USBH_StatusTypeDef USBH_HandleEnum (USBH_HandleTypeDef *phost)
 USBH_HandleEnum This function includes the complete enumeration process. More...
 
static void USBH_HandleSof (USBH_HandleTypeDef *phost)
 USBH_HandleSof Call SOF process. More...
 
static USBH_StatusTypeDef DeInitStateMachine (USBH_HandleTypeDef *phost)
 DeInitStateMachine De-Initialize the Host state machine. More...
 
USBH_StatusTypeDef USBH_Init (USBH_HandleTypeDef *phost, void(*pUsrFunc)(USBH_HandleTypeDef *phost, uint8_t), uint8_t id)
 HCD_Init Initialize the HOST Core. More...
 
USBH_StatusTypeDef USBH_DeInit (USBH_HandleTypeDef *phost)
 HCD_Init De-Initialize the Host portion of the driver. More...
 
USBH_StatusTypeDef USBH_RegisterClass (USBH_HandleTypeDef *phost, USBH_ClassTypeDef *pclass)
 USBH_RegisterClass Link class driver to Host Core. More...
 
USBH_StatusTypeDef USBH_SelectInterface (USBH_HandleTypeDef *phost, uint8_t interface)
 USBH_SelectInterface Select current interface. More...
 
uint8_t USBH_GetActiveClass (USBH_HandleTypeDef *phost)
 USBH_GetActiveClass Return Device Class. More...
 
uint8_t USBH_FindInterface (USBH_HandleTypeDef *phost, uint8_t Class, uint8_t SubClass, uint8_t Protocol)
 USBH_FindInterface Find the interface index for a specific class. More...
 
uint8_t USBH_FindInterfaceIndex (USBH_HandleTypeDef *phost, uint8_t interface_number, uint8_t alt_settings)
 USBH_FindInterfaceIndex Find the interface index for a specific class interface and alternate setting number. More...
 
USBH_StatusTypeDef USBH_Start (USBH_HandleTypeDef *phost)
 USBH_Start Start the USB Host Core. More...
 
USBH_StatusTypeDef USBH_Stop (USBH_HandleTypeDef *phost)
 USBH_Stop Stop the USB Host Core. More...
 
USBH_StatusTypeDef USBH_ReEnumerate (USBH_HandleTypeDef *phost)
 HCD_ReEnumerate Perform a new Enumeration phase. More...
 
USBH_StatusTypeDef USBH_Process (USBH_HandleTypeDef *phost)
 USBH_Process Background process of the USB Core. More...
 
void USBH_LL_SetTimer (USBH_HandleTypeDef *phost, uint32_t time)
 USBH_LL_SetTimer Set the initial Host Timer tick. More...
 
void USBH_LL_IncTimer (USBH_HandleTypeDef *phost)
 USBH_LL_IncTimer Increment Host Timer tick. More...
 
USBH_StatusTypeDef USBH_LL_Connect (USBH_HandleTypeDef *phost)
 USBH_LL_Connect Handle USB Host connexion event. More...
 
USBH_StatusTypeDef USBH_LL_Disconnect (USBH_HandleTypeDef *phost)
 USBH_LL_Disconnect Handle USB Host disconnection event. More...
 

Detailed Description

This file implements the functions for the core state machine process the enumeration and the control transfer process.

Author
MCD Application Team
Version
V3.2.2
Date
07-July-2015
Attention

© COPYRIGHT 2015 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.