Prusa MINI Firmware overview
|
|
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...
|
|
◆ USBH_HandleEnum()
USBH_HandleEnum This function includes the complete enumeration process.
- Parameters
-
- Return values
-
718 #if (USBH_USE_OS == 1)
727 #if (USBH_USE_OS == 1)
750 #if (USBH_USE_OS == 1)
773 #if (USBH_USE_OS == 1)
◆ USBH_HandleSof()
USBH_HandleSof Call SOF process.
- Parameters
-
- Return values
-
◆ DeInitStateMachine()
DeInitStateMachine De-Initialize the Host state machine.
- Parameters
-
- Return values
-
◆ USBH_Init()
HCD_Init Initialize the HOST Core.
- Parameters
-
phost | Host Handle |
pUsrFunc | User Callback |
- Return values
-
114 phost->
pUser = pUsrFunc;
117 #if (USBH_USE_OS == 1)
124 #if defined (USBH_PROCESS_STACK_SIZE)
◆ USBH_DeInit()
HCD_Init De-Initialize the Host portion of the driver.
- Parameters
-
- Return values
-
◆ USBH_RegisterClass()
USBH_RegisterClass Link class driver to Host Core.
- Parameters
-
phost | : Host Handle |
pclass | Class handle |
- Return values
-
◆ USBH_SelectInterface()
USBH_SelectInterface Select current interface.
- Parameters
-
phost | Host Handle |
interface | Interface number |
- Return values
-
237 if(interface < phost->device.CfgDesc.bNumInterfaces)
240 USBH_UsrLog (
"Switching to Interface (#%d)", interface);
◆ USBH_GetActiveClass()
USBH_GetActiveClass Return Device Class.
- Parameters
-
phost | Host Handle |
interface | Interface index |
- Return values
-
◆ USBH_FindInterface()
USBH_FindInterface Find the interface index for a specific class.
- Parameters
-
phost | Host Handle |
Class | Class code |
SubClass | SubClass code |
Protocol | Protocol code |
- Return values
-
interface | index in the configuration structure |
- Note
- : (1)interface index 0xFF means interface index not found
◆ USBH_FindInterfaceIndex()
USBH_FindInterfaceIndex Find the interface index for a specific class interface and alternate setting number.
- Parameters
-
phost | Host Handle |
interface_number | interface number |
alt_settings | : alternate setting number |
- Return values
-
interface | index in the configuration structure |
- Note
- : (1)interface index 0xFF means interface index not found
◆ USBH_Start()
USBH_Start Start the USB Host Core.
- Parameters
-
- Return values
-
◆ USBH_Stop()
USBH_Stop Stop the USB Host Core.
- Parameters
-
- Return values
-
◆ USBH_ReEnumerate()
HCD_ReEnumerate Perform a new Enumeration phase.
- Parameters
-
- Return values
-
385 #if (USBH_USE_OS == 1)
◆ USBH_Process()
USBH_Process Background process of the USB Core.
- Parameters
-
- Return values
-
412 #if (USBH_USE_OS == 1)
454 #if (USBH_USE_OS == 1)
469 USBH_UsrLog (
"This device has only 1 configuration.");
489 #if (USBH_USE_OS == 1)
544 USBH_UsrLog (
"No registered class for this device.");
548 #if (USBH_USE_OS == 1)
569 #if (USBH_USE_OS == 1)
◆ USBH_LL_SetTimer()
USBH_LL_SetTimer Set the initial Host Timer tick.
- Parameters
-
- Return values
-
◆ USBH_LL_IncTimer()
USBH_LL_IncTimer Increment Host Timer tick.
- Parameters
-
- Return values
-
◆ USBH_LL_Connect()
USBH_LL_Connect Handle USB Host connexion event.
- Parameters
-
- Return values
-
841 #if (USBH_USE_OS == 1)
◆ USBH_LL_Disconnect()
USBH_LL_Disconnect Handle USB Host disconnection event.
- Parameters
-
- Return values
-
876 #if (USBH_USE_OS == 1)
uint16_t idVendor
Definition: usbh_def.h:249
Definition: usbh_def.h:337
USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost)
Return the USB host speed from the low level driver.
Definition: usbh_conf.c:314
#define HOST_USER_SELECT_CONFIGURATION
Definition: usbh_core.h:64
USBH_StatusTypeDef USBH_SetCfg(USBH_HandleTypeDef *phost, uint16_t configuration_value)
USBH_SetCfg The command sets the configuration value to the connected device.
Definition: usbh_ctlreq.c:260
Definition: usbh_def.h:348
#define osThreadDef(name, thread, priority, instances, stacksz)
Definition: cmsis_os.h:468
uint8_t current_interface
Definition: usbh_def.h:428
USBH_StatusTypeDef USBH_Get_CfgDesc(USBH_HandleTypeDef *phost, uint16_t length)
USBH_Get_CfgDesc Issues Configuration Descriptor to the device. Once the response received,...
Definition: usbh_ctlreq.c:137
USBH_InterfaceDescTypeDef Itf_Desc[USBH_MAX_NUM_INTERFACES]
Definition: usbh_def.h:296
static USBH_StatusTypeDef USBH_HandleEnum(USBH_HandleTypeDef *phost)
USBH_HandleEnum This function includes the complete enumeration process.
Definition: usbh_core.c:609
USBH_StatusTypeDef USBH_Start(USBH_HandleTypeDef *phost)
USBH_Start Start the USB Host Core.
Definition: usbh_core.c:333
#define HOST_USER_DISCONNECTION
Definition: usbh_core.h:68
void USBH_Delay(uint32_t Delay)
Delay routine for the USB Host Library.
Definition: usbh_conf.c:601
CMD_StateTypeDef RequestState
Definition: usbh_def.h:454
Definition: usbh_def.h:335
uint8_t Data[USBH_MAX_DATA_BUFFER]
Definition: usbh_def.h:424
USBH_StatusTypeDef USBH_SetAddress(USBH_HandleTypeDef *phost, uint8_t DeviceAddress)
USBH_SetAddress This command sets the address to the connected device.
Definition: usbh_ctlreq.c:236
USBH_DevDescTypeDef DevDesc
Definition: usbh_def.h:429
uint8_t bInterfaceNumber
Definition: usbh_def.h:274
#define USBH_ErrLog(...)
Definition: usbh_conf.h:176
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,...
Definition: usbh_ctlreq.c:175
USBH_StatusTypeDef(* Requests)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:443
USBH_StatusTypeDef USBH_LL_DriverVBUS(USBH_HandleTypeDef *phost, uint8_t)
Drive VBUS.
Definition: usbh_conf.c:532
uint8_t i
Definition: screen_test_graph.c:72
Definition: usbh_def.h:350
USBH_StatusTypeDef(* BgndProcess)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:444
uint8_t bConfigurationValue
Definition: usbh_def.h:292
Definition: usbh_def.h:331
Definition: usbh_def.h:334
#define USB_CONFIGURATION_DESC_SIZE
Definition: usbh_def.h:151
__IO uint32_t Timer
Definition: usbh_def.h:461
#define HOST_USER_CONNECTION
Definition: usbh_core.h:67
uint8_t iManufacturer
Definition: usbh_def.h:252
Definition: usbh_def.h:333
#define NULL
Definition: usbd_def.h:53
void * pData
Definition: usbh_def.h:446
USBH_CtrlTypeDef Control
Definition: usbh_def.h:455
USBH_StatusTypeDef USBH_LL_ResetPort(USBH_HandleTypeDef *phost)
Reset the Host port of the low level driver.
Definition: usbh_conf.c:342
Definition: usbh_def.h:270
uint8_t address
Definition: usbh_def.h:425
USBH_StatusTypeDef USBH_LL_Stop(USBH_HandleTypeDef *phost)
Stop the low level portion of the host driver.
Definition: usbh_conf.c:283
default
Definition: createSpeedLookupTable.py:15
Definition: usbh_def.h:320
uint8_t id
Definition: usbh_def.h:462
Definition: usbh_def.h:330
Definition: usbh_def.h:328
Definition: usbh_def.h:329
USBH_StatusTypeDef USBH_FreePipe(USBH_HandleTypeDef *phost, uint8_t idx)
USBH_Free_Pipe Free the USB Pipe.
Definition: usbh_pipes.c:158
Definition: usbh_def.h:340
USBH_StatusTypeDef(* SOFProcess)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:445
USBH_CfgDescTypeDef CfgDesc
Definition: usbh_def.h:430
#define USBH_ADDRESS_DEFAULT
Definition: usbh_core.c:51
uint8_t bNumConfigurations
Definition: usbh_def.h:255
USBH_StatusTypeDef USBH_OpenPipe(USBH_HandleTypeDef *phost, uint8_t ch_num, uint8_t epnum, uint8_t dev_address, uint8_t speed, uint8_t ep_type, uint16_t mps)
USBH_Open_Pipe Open a pipe.
Definition: usbh_pipes.c:93
USBH_StatusTypeDef USBH_LL_Start(USBH_HandleTypeDef *phost)
Start the low level portion of the host driver.
Definition: usbh_conf.c:252
Definition: usbh_def.h:346
Definition: usbh_def.h:380
#define USBH_PROCESS_STACK_SIZE
Definition: usbh_conf.h:133
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,...
Definition: usbh_ctlreq.c:112
Definition: usbh_def.h:351
#define TRUE
Definition: usbh_def.h:61
Definition: usbh_def.h:353
uint8_t ClassCode
Definition: usbh_def.h:440
#define USBH_MPS_DEFAULT
Definition: usbh_core.c:53
#define USBH_MAX_NUM_SUPPORTED_CLASS
Definition: usbh_conf.h:111
Definition: usbh_def.h:304
#define configMINIMAL_STACK_SIZE
Definition: FreeRTOSConfig.h:111
osStatus osMessagePut(osMessageQId queue_id, uint32_t info, uint32_t millisec)
Put a Message to a Queue.
Definition: cmsis_os.c:1113
Definition: usbh_def.h:399
Definition: usbh_def.h:286
USBH_StatusTypeDef USBH_Stop(USBH_HandleTypeDef *phost)
USBH_Stop Stop the USB Host Core.
Definition: usbh_core.c:350
Definition: usbh_def.h:347
USBH_DeviceTypeDef device
Definition: usbh_def.h:456
uint8_t speed
Definition: usbh_def.h:426
#define USBH_DEVICE_ADDRESS
Definition: usbh_def.h:185
__IO uint8_t is_connected
Definition: usbh_def.h:427
CTRL_StateTypeDef state
Definition: usbh_def.h:413
uint8_t pipe_size
Definition: usbh_def.h:408
uint32_t Pipes[15]
Definition: usbh_def.h:460
Definition: usbh_def.h:352
USBH_StatusTypeDef(* DeInit)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:442
#define USBH_PROCESS_PRIO
Definition: usbh_conf.h:132
uint8_t iProduct
Definition: usbh_def.h:253
USBH_StatusTypeDef(* Init)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:441
uint8_t bMaxPacketSize
Definition: usbh_def.h:248
uint8_t pipe_in
Definition: usbh_def.h:406
#define HOST_USER_CLASS_SELECTED
Definition: usbh_core.h:66
#define FALSE
Definition: usbh_def.h:57
const uint8_t[]
Definition: 404_html.c:3
#define USBH_UsrLog(...)
Definition: usbh_conf.h:166
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
Initialize the low level portion of the host driver.
Definition: usbh_conf.c:191
USBH_StatusTypeDef
Definition: usbh_def.h:302
uint16_t idProduct
Definition: usbh_def.h:250
Definition: usbh_def.h:360
ENUM_StateTypeDef EnumState
Definition: usbh_def.h:453
uint8_t bInterfaceProtocol
Definition: usbh_def.h:279
uint8_t bInterfaceSubClass
Definition: usbh_def.h:278
static USBH_StatusTypeDef DeInitStateMachine(USBH_HandleTypeDef *phost)
DeInitStateMachine De-Initialize the Host state machine.
Definition: usbh_core.c:162
USBH_ClassTypeDef * pClass[USBH_MAX_NUM_SUPPORTED_CLASS]
Definition: usbh_def.h:457
uint8_t errorcount
Definition: usbh_def.h:414
static status_t status
Definition: filament_sensor.c:37
uint32_t ClassNumber
Definition: usbh_def.h:459
uint8_t pipe_out
Definition: usbh_def.h:407
void * pData
Definition: usbh_def.h:463
osMessageQId osMessageCreate(const osMessageQDef_t *queue_def, osThreadId thread_id)
Create and Initialize a Message Queue.
Definition: cmsis_os.c:1086
uint8_t iSerialNumber
Definition: usbh_def.h:254
#define USBH_MAX_DATA_BUFFER
Definition: usbh_conf.h:117
#define osMessageQ(name)
Access a Message Queue Definition.
Definition: cmsis_os.h:829
Definition: usbh_def.h:306
Definition: usbh_def.h:305
uint16_t wTotalLength
Definition: usbh_def.h:290
void(* pUser)(struct _USBH_HandleTypeDef *pHandle, uint8_t id)
Definition: usbh_def.h:464
const char * Name
Definition: usbh_def.h:439
#define USBH_MAX_NUM_INTERFACES
Definition: usbh_conf.h:102
USBH_ClassTypeDef * pActiveClass
Definition: usbh_def.h:458
static void USBH_HandleSof(USBH_HandleTypeDef *phost)
USBH_HandleSof Call SOF process.
Definition: usbh_core.c:813
__IO HOST_StateTypeDef gState
Definition: usbh_def.h:452
#define USBH_EP_CONTROL
Definition: usbh_ioreq.h:61
Definition: usbh_def.h:395
#define USB_DEVICE_DESC_SIZE
Definition: usbh_def.h:150
uint8_t USBH_AllocPipe(USBH_HandleTypeDef *phost, uint8_t ep_addr)
USBH_Alloc_Pipe Allocate a new Pipe.
Definition: usbh_pipes.c:138
uint8_t bAlternateSetting
Definition: usbh_def.h:275
Definition: usbh_def.h:338
Definition: usbh_def.h:349
osThreadId osThreadCreate(const osThreadDef_t *thread_def, void *argument)
Create a thread and add it to Active Threads and set it to state READY.
Definition: cmsis_os.c:245
Definition: usbh_def.h:336
#define USBH_MAX_PIPES_NBR
Definition: usbh_def.h:180
#define osThread(name)
Definition: cmsis_os.h:478
uint8_t bInterfaceClass
Definition: usbh_def.h:277
#define osMessageQDef(name, queue_sz, type)
Create a Message Queue Definition.
Definition: cmsis_os.h:818