Prusa MINI Firmware overview
usbh_ctlreq.c File Reference

This file implements the control requests for device enumeration. More...

#include "usbh_ctlreq.h"

Functions

static USBH_StatusTypeDef USBH_HandleControl (USBH_HandleTypeDef *phost)
 USBH_HandleControl Handles the USB control transfer state machine. More...
 
static void USBH_ParseDevDesc (USBH_DevDescTypeDef *dev_desc, uint8_t *buf, uint16_t length)
 USBH_ParseDevDesc This function Parses the device descriptor. More...
 
static void USBH_ParseCfgDesc (USBH_CfgDescTypeDef *cfg_desc, uint8_t *buf, uint16_t length)
 USBH_ParseCfgDesc This function Parses the configuration descriptor. More...
 
static void USBH_ParseEPDesc (USBH_EpDescTypeDef *ep_descriptor, uint8_t *buf)
 USBH_ParseEPDesc This function Parses the endpoint descriptor. More...
 
static void USBH_ParseStringDesc (uint8_t *psrc, uint8_t *pdest, uint16_t length)
 USBH_ParseStringDesc This function Parses the string descriptor. More...
 
static void USBH_ParseInterfaceDesc (USBH_InterfaceDescTypeDef *if_descriptor, uint8_t *buf)
 USBH_ParseInterfaceDesc This function Parses the interface descriptor. More...
 
USBH_StatusTypeDef USBH_Get_DevDesc (USBH_HandleTypeDef *phost, uint8_t length)
 USBH_Get_DevDesc Issue Get Device Descriptor command to the device. Once the response received, it parses the device descriptor and updates the status. More...
 
USBH_StatusTypeDef USBH_Get_CfgDesc (USBH_HandleTypeDef *phost, uint16_t length)
 USBH_Get_CfgDesc Issues Configuration Descriptor to the device. Once the response received, it parses the configuration descriptor and updates the status. More...
 
USBH_StatusTypeDef USBH_Get_StringDesc (USBH_HandleTypeDef *phost, uint8_t string_index, uint8_t *buff, uint16_t length)
 USBH_Get_StringDesc Issues string Descriptor command to the device. Once the response received, it parses the string descriptor and updates the status. More...
 
USBH_StatusTypeDef USBH_GetDescriptor (USBH_HandleTypeDef *phost, uint8_t req_type, uint16_t value_idx, uint8_t *buff, uint16_t length)
 USBH_GetDescriptor Issues Descriptor command to the device. Once the response received, it parses the descriptor and updates the status. More...
 
USBH_StatusTypeDef USBH_SetAddress (USBH_HandleTypeDef *phost, uint8_t DeviceAddress)
 USBH_SetAddress This command sets the address to the connected device. More...
 
USBH_StatusTypeDef USBH_SetCfg (USBH_HandleTypeDef *phost, uint16_t cfg_idx)
 USBH_SetCfg The command sets the configuration value to the connected device. More...
 
USBH_StatusTypeDef USBH_SetInterface (USBH_HandleTypeDef *phost, uint8_t ep_num, uint8_t altSetting)
 USBH_SetInterface The command sets the Interface value to the connected device. More...
 
USBH_StatusTypeDef USBH_ClrFeature (USBH_HandleTypeDef *phost, uint8_t ep_num)
 USBH_ClrFeature This request is used to clear or disable a specific feature. More...
 
USBH_DescHeader_tUSBH_GetNextDesc (uint8_t *pbuf, uint16_t *ptr)
 USBH_GetNextDesc This function return the next descriptor header. More...
 
USBH_StatusTypeDef USBH_CtlReq (USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length)
 USBH_CtlReq USBH_CtlReq sends a control request and provide the status after completion of the request. More...
 

Detailed Description

This file implements the control requests for device enumeration.

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.