Prusa MINI Firmware overview
|
|
USBD_StatusTypeDef | USBD_StdDevReq (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_StdDevReq Handle standard usb device requests. More...
|
|
USBD_StatusTypeDef | USBD_StdItfReq (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_StdItfReq Handle standard usb interface requests. More...
|
|
USBD_StatusTypeDef | USBD_StdEPReq (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_StdEPReq Handle standard usb endpoint requests. More...
|
|
void | USBD_ParseSetupRequest (USBD_SetupReqTypedef *req, uint8_t *pdata) |
| USBD_ParseSetupRequest Copy buffer into setup structure. More...
|
|
void | USBD_CtlError (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_CtlError Handle USB low level Error. More...
|
|
void | USBD_GetString (uint8_t *desc, uint8_t *unicode, uint16_t *len) |
| USBD_GetString Convert Ascii string into unicode one. More...
|
|
static void | USBD_GetDescriptor (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_GetDescriptor Handle Get Descriptor requests. More...
|
|
static void | USBD_SetAddress (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_SetAddress Set device address. More...
|
|
static void | USBD_SetConfig (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_SetConfig Handle Set device configuration request. More...
|
|
static void | USBD_GetConfig (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_GetConfig Handle Get device configuration request. More...
|
|
static void | USBD_GetStatus (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_GetStatus Handle Get Status request. More...
|
|
static void | USBD_SetFeature (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_SetFeature Handle Set device feature request. More...
|
|
static void | USBD_ClrFeature (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) |
| USBD_ClrFeature Handle clear device feature request. More...
|
|
static uint8_t | USBD_GetLen (uint8_t *buf) |
| USBD_GetLen return the string length. More...
|
|
◆ USBD_StdDevReq()
USBD_StdDevReq Handle standard usb device requests.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_StdItfReq()
USBD_StdItfReq Handle standard usb interface requests.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_StdEPReq()
USBD_StdEPReq Handle standard usb endpoint requests.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
231 if ((ep_addr != 0x00) && (ep_addr != 0x80))
240 if ((ep_addr != 0x00) && (ep_addr != 0x80))
262 if ((ep_addr != 0x00) && (ep_addr != 0x80))
271 if ((ep_addr & 0x7F) != 0x00)
290 if ((ep_addr & 0x7F) != 0x00)
297 pep = ((ep_addr & 0x80) == 0x80) ? &pdev->
ep_in[ep_addr & 0x7F]:\
298 &pdev->
ep_out[ep_addr & 0x7F];
◆ USBD_ParseSetupRequest()
USBD_ParseSetupRequest Copy buffer into setup structure.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_CtlError()
USBD_CtlError Handle USB low level Error.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_GetString()
USBD_GetString Convert Ascii string into unicode one.
- Parameters
-
desc | : descriptor buffer |
unicode | : Formatted string buffer (unicode) |
len | : descriptor length |
- Return values
-
739 unicode[idx++] = *len;
742 while (*desc !=
'\0')
744 unicode[idx++] = *desc++;
745 unicode[idx++] = 0x00;
◆ USBD_GetDescriptor()
USBD_GetDescriptor Handle Get Descriptor requests.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
340 #if (USBD_LPM_ENABLED == 1)
390 #if (USBD_SUPPORT_USER_STRING == 1)
430 if((len != 0)&& (req->
wLength != 0))
◆ USBD_SetAddress()
USBD_SetAddress Set device address.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_SetConfig()
USBD_SetConfig Handle Set device configuration request.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_GetConfig()
USBD_GetConfig Handle Get device configuration request.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_GetStatus()
USBD_GetStatus Handle Get Status request.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
618 #if ( USBD_SELF_POWERED == 1)
◆ USBD_SetFeature()
USBD_SetFeature Handle Set device feature request.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_ClrFeature()
USBD_ClrFeature Handle clear device feature request.
- Parameters
-
pdev | device instance |
req | usb request |
- Return values
-
◆ USBD_GetLen()
USBD_GetLen return the string length.
- Parameters
-
buf | : pointer to the ascii string buffer |
- Return values
-
#define USB_REQ_SET_ADDRESS
Definition: usbd_def.h:86
#define USB_REQ_GET_STATUS
Definition: usbd_def.h:83
#define USBD_STATE_ADDRESSED
Definition: usbd_def.h:119
#define USB_DESC_TYPE_STRING
Definition: usbd_def.h:97
#define USB_REQ_SET_CONFIGURATION
Definition: usbd_def.h:90
#define USBD_IDX_CONFIG_STR
Definition: usbd_def.h:70
uint8_t *(* GetSerialStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:207
uint8_t *(* GetConfigurationStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:208
uint32_t status
Definition: usbd_def.h:218
#define USB_CONFIG_SELF_POWERED
Definition: usbd_def.h:105
uint16_t wLength
Definition: usbd_def.h:155
#define USBD_STATE_CONFIGURED
Definition: usbd_def.h:120
#define LOBYTE(x)
Definition: usbd_def.h:263
USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
USBD_ClrClassConfig Clear current configuration.
Definition: usbd_core.c:249
uint8_t(* Setup)(struct _USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
Definition: usbd_def.h:165
USBD_ClassTypeDef * pClass
Definition: usbd_def.h:245
#define MIN(a, b)
Definition: usbd_def.h:265
Definition: usbd_def.h:197
uint8_t dev_state
Definition: usbd_def.h:236
#define USB_REQ_CLEAR_FEATURE
Definition: usbd_def.h:84
USBD_EndpointTypeDef ep_in[15]
Definition: usbd_def.h:232
USBD_DescriptorsTypeDef * pDesc
Definition: usbd_def.h:244
uint8_t *(* GetHSConfigDescriptor)(uint16_t *length)
Definition: usbd_def.h:175
USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Clears a Stall condition on an endpoint of the Low Level Driver.
Definition: usbd_conf.c:548
USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
Assigns a USB address to the device.
Definition: usbd_conf.c:596
uint8_t *(* GetLangIDStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:204
#define USBD_IDX_PRODUCT_STR
Definition: usbd_def.h:68
#define USB_DESC_TYPE_CONFIGURATION
Definition: usbd_def.h:96
uint8_t bmRequest
Definition: usbd_def.h:151
#define USB_DESC_TYPE_DEVICE_QUALIFIER
Definition: usbd_def.h:100
#define USB_REQ_GET_CONFIGURATION
Definition: usbd_def.h:89
#define USB_DESC_TYPE_DEVICE
Definition: usbd_def.h:95
#define NULL
Definition: usbd_def.h:53
static uint8_t USBD_GetLen(uint8_t *buf)
USBD_GetLen return the string length.
Definition: usbd_ctlreq.c:756
uint8_t *(* GetManufacturerStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:205
uint32_t dev_config
Definition: usbd_def.h:228
#define USBD_MAX_NUM_CONFIGURATION
Definition: usbd_conf.h:97
default
Definition: createSpeedLookupTable.py:15
#define USB_REQ_GET_DESCRIPTOR
Definition: usbd_def.h:87
USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev, uint8_t *buf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
Definition: usbd_ioreq.c:95
#define USBD_IDX_MFC_STR
Definition: usbd_def.h:67
#define USB_DESC_TYPE_BOS
Definition: usbd_def.h:102
#define USB_FEATURE_REMOTE_WAKEUP
Definition: usbd_def.h:108
#define USB_FEATURE_EP_HALT
Definition: usbd_def.h:107
USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
USBD_SetClassConfig Configure device and start the interface.
Definition: usbd_core.c:227
#define USBD_IDX_INTERFACE_STR
Definition: usbd_def.h:71
uint8_t *(* GetInterfaceStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:209
USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Sets a Stall condition on an endpoint of the Low Level Driver.
Definition: usbd_conf.c:516
Definition: usbd_def.h:216
#define USBD_IDX_LANGID_STR
Definition: usbd_def.h:66
uint32_t dev_remote_wakeup
Definition: usbd_def.h:241
uint32_t dev_config_status
Definition: usbd_def.h:230
uint16_t wIndex
Definition: usbd_def.h:154
static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_GetConfig Handle Get device configuration request.
Definition: usbd_ctlreq.c:568
#define SWAPBYTE(addr)
Definition: usbd_def.h:260
static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_SetFeature Handle Set device feature request.
Definition: usbd_ctlreq.c:648
Definition: usbd_def.h:188
void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_CtlError Handle USB low level Error.
Definition: usbd_ctlreq.c:716
const uint8_t[]
Definition: 404_html.c:3
static void USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_SetConfig Handle Set device configuration request.
Definition: usbd_ctlreq.c:491
USBD_SpeedTypeDef dev_speed
Definition: usbd_def.h:231
static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_GetStatus Handle Get Status request.
Definition: usbd_ctlreq.c:608
uint16_t wValue
Definition: usbd_def.h:153
USBD_EndpointTypeDef ep_out[15]
Definition: usbd_def.h:233
USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
USBD_CtlSendStatus send zero lzngth packet on the ctl pipe.
Definition: usbd_ioreq.c:177
#define USBD_STATE_DEFAULT
Definition: usbd_def.h:118
uint8_t *(* GetProductStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:206
#define USBD_IDX_SERIAL_STR
Definition: usbd_def.h:69
#define USB_REQ_SET_FEATURE
Definition: usbd_def.h:85
uint8_t *(* GetDeviceDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length)
Definition: usbd_def.h:203
USBD_StatusTypeDef
Definition: usbd_def.h:194
uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
Returns Stall condition.
Definition: usbd_conf.c:580
uint8_t bRequest
Definition: usbd_def.h:152
#define USB_CONFIG_REMOTE_WAKEUP
Definition: usbd_def.h:104
uint8_t *(* GetFSConfigDescriptor)(uint16_t *length)
Definition: usbd_def.h:176
#define USBD_MAX_NUM_INTERFACES
Definition: usbd_conf.h:95
static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_ClrFeature Handle clear device feature request.
Definition: usbd_ctlreq.c:669
uint8_t dev_address
Definition: usbd_def.h:238
uint8_t *(* GetDeviceQualifierDescriptor)(uint16_t *length)
Definition: usbd_def.h:178
uint32_t dev_default_config
Definition: usbd_def.h:229
Definition: usbd_def.h:195
static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_GetDescriptor Handle Get Descriptor requests.
Definition: usbd_ctlreq.c:331
#define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION
Definition: usbd_def.h:101
static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
USBD_SetAddress Set device address.
Definition: usbd_ctlreq.c:449
uint8_t *(* GetOtherSpeedConfigDescriptor)(uint16_t *length)
Definition: usbd_def.h:177