Prusa MINI Firmware overview
|
|
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...
|
|
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_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_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_SetCfg (USBH_HandleTypeDef *phost, uint16_t configuration_value) |
| USBH_SetCfg The command sets the configuration value to the connected device. 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_SetAddress (USBH_HandleTypeDef *phost, uint8_t DeviceAddress) |
| USBH_SetAddress This command sets the address 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_t * | USBH_GetNextDesc (uint8_t *pbuf, uint16_t *ptr) |
| USBH_GetNextDesc This function return the next descriptor header. More...
|
|
◆ USBH_CtlReq()
USBH_CtlReq USBH_CtlReq sends a control request and provide the status after completion of the request.
- Parameters
-
phost | Host Handle |
req | Setup Request Structure |
buff | data buffer address to store the response |
length | length of the response |
- Return values
-
547 #if (USBH_USE_OS == 1)
◆ USBH_GetDescriptor()
USBH_GetDescriptor Issues Descriptor command to the device. Once the response received, it parses the descriptor and updates the status.
- Parameters
-
phost | Host Handle |
req_type | Descriptor type |
value_idx | Value for the GetDescriptr request |
buff | Buffer to store the descriptor |
length | Length of the descriptor |
- Return values
-
◆ USBH_Get_DevDesc()
USBH_Get_DevDesc Issue Get Device Descriptor command to the device. Once the response received, it parses the device descriptor and updates the status.
- Parameters
-
phost | Host Handle |
length | Length of the descriptor |
- Return values
-
◆ USBH_Get_StringDesc()
USBH_Get_StringDesc Issues string Descriptor command to the device. Once the response received, it parses the string descriptor and updates the status.
- Parameters
-
phost | Host Handle |
string_index | String index for the descriptor |
buff | Buffer address for the descriptor |
length | Length of the descriptor |
- Return values
-
◆ USBH_SetCfg()
USBH_SetCfg The command sets the configuration value to the connected device.
- Parameters
-
phost | Host Handle |
cfg_idx | Configuration value |
- Return values
-
266 USB_REQ_TYPE_STANDARD;
◆ USBH_Get_CfgDesc()
USBH_Get_CfgDesc Issues Configuration Descriptor to the device. Once the response received, it parses the configuration descriptor and updates the status.
- Parameters
-
phost | Host Handle |
length | Length of the descriptor |
- Return values
-
143 #if (USBH_KEEP_CFG_DESCRIPTOR == 1)
144 pData = phost->
device.CfgDesc_Raw;
◆ USBH_SetAddress()
USBH_SetAddress This command sets the address to the connected device.
- Parameters
-
phost | Host Handle |
DeviceAddress | Device address to assign |
- Return values
-
242 USB_REQ_TYPE_STANDARD;
◆ USBH_SetInterface()
USBH_SetInterface The command sets the Interface value to the connected device.
- Parameters
-
phost | Host Handle |
altSetting | Interface value |
- Return values
-
290 USB_REQ_TYPE_STANDARD;
◆ USBH_ClrFeature()
USBH_ClrFeature This request is used to clear or disable a specific feature.
- Parameters
-
phost | Host Handle |
ep_num | endpoint number |
hc_num | Host channel number |
- Return values
-
◆ USBH_GetNextDesc()
USBH_GetNextDesc This function return the next descriptor header.
- Parameters
-
buf | Buffer where the cfg descriptor is available |
ptr | data pointer inside the cfg descriptor |
- Return values
-
Definition: usbh_def.h:381
#define USB_REQ_SET_ADDRESS
Definition: usbd_def.h:86
USB_Setup_TypeDef setup
Definition: usbh_def.h:412
#define USB_REQ_SET_CONFIGURATION
Definition: usbd_def.h:90
uint8_t * buff
Definition: usbh_def.h:409
uint8_t bRequest
Definition: usbh_def.h:222
static USBH_StatusTypeDef USBH_HandleControl(USBH_HandleTypeDef *phost)
USBH_HandleControl Handles the USB control transfer state machine.
Definition: usbh_ctlreq.c:581
CMD_StateTypeDef RequestState
Definition: usbh_def.h:454
uint8_t Data[USBH_MAX_DATA_BUFFER]
Definition: usbh_def.h:424
#define USB_REQ_CLEAR_FEATURE
Definition: usbd_def.h:84
USBH_DevDescTypeDef DevDesc
Definition: usbh_def.h:429
uint16_t_uint8_t wIndex
Definition: usbh_def.h:224
uint16_t length
Definition: usbh_def.h:410
static void USBH_ParseDevDesc(USBH_DevDescTypeDef *, uint8_t *buf, uint16_t length)
USBH_ParseDevDesc This function Parses the device descriptor.
Definition: usbh_ctlreq.c:333
#define USB_REQ_SET_INTERFACE
Definition: usbd_def.h:92
USBH_CtrlTypeDef Control
Definition: usbh_def.h:455
uint16_t_uint8_t wValue
Definition: usbh_def.h:223
#define USB_DESC_STRING
Definition: usbh_def.h:160
#define USB_REQ_RECIPIENT_DEVICE
Definition: usbd_def.h:78
#define USB_REQ_RECIPIENT_INTERFACE
Definition: usbd_def.h:79
#define USB_REQ_GET_DESCRIPTOR
Definition: usbd_def.h:87
USBH_CfgDescTypeDef CfgDesc
Definition: usbh_def.h:430
#define FEATURE_SELECTOR_ENDPOINT
Definition: usbh_ctlreq.h:57
Definition: usbh_def.h:380
uint16_t_uint8_t wLength
Definition: usbh_def.h:225
Definition: usbh_def.h:304
osStatus osMessagePut(osMessageQId queue_id, uint32_t info, uint32_t millisec)
Put a Message to a Queue.
Definition: cmsis_os.c:1113
USBH_DeviceTypeDef device
Definition: usbh_def.h:456
Definition: usbh_def.h:397
CTRL_StateTypeDef state
Definition: usbh_def.h:413
static void USBH_ParseStringDesc(uint8_t *psrc, uint8_t *pdest, uint16_t length)
USBH_ParseStringDesc This function Parses the string descriptor.
Definition: usbh_ctlreq.c:472
const uint8_t[]
Definition: 404_html.c:3
static void USBH_ParseCfgDesc(USBH_CfgDescTypeDef *cfg_desc, uint8_t *buf, uint16_t length)
USBH_ParseCfgDesc This function Parses the configuration descriptor.
Definition: usbh_ctlreq.c:366
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 reques...
Definition: usbh_ctlreq.c:531
struct _USB_Setup::_SetupPkt_Struc b
USBH_StatusTypeDef
Definition: usbh_def.h:302
Definition: usbh_def.h:360
uint8_t bLength
Definition: usbh_def.h:232
static status_t status
Definition: filament_sensor.c:37
#define USB_H2D
Definition: usbh_def.h:108
Definition: usbh_def.h:359
uint16_t w
Definition: usbh_def.h:204
#define USB_REQ_RECIPIENT_ENDPOINT
Definition: usbd_def.h:80
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,...
Definition: usbh_ctlreq.c:204
Definition: usbh_def.h:306
#define USB_D2H
Definition: usbh_def.h:109
Definition: usbh_def.h:305
#define USB_DESC_CONFIGURATION
Definition: usbh_def.h:159
#define USB_DESC_DEVICE
Definition: usbh_def.h:158
#define USB_REQ_TYPE_STANDARD
Definition: usbd_def.h:73
png_uint_32 length
Definition: png.c:2247
uint8_t bmRequestType
Definition: usbh_def.h:221