Prusa MINI Firmware overview
|
Go to the documentation of this file.
39 #ifndef _CPU_UTILS_H__
40 #define _CPU_UTILS_H__
53 #define CALCULATION_PERIOD 1000
Definition: usbh_def.h:381
Definition: usbh_def.h:389
#define USB_REQ_SET_ADDRESS
Definition: usbd_def.h:86
uint32_t osCPU_TotalIdleTime
Definition: cpu_utils.c:67
uint16_t idVendor
Definition: usbh_def.h:249
#define USB_DESC_TYPE_STRING
Definition: usbd_def.h:97
USB_Setup_TypeDef setup
Definition: usbh_def.h:412
#define USB_REQ_SET_CONFIGURATION
Definition: usbd_def.h:90
xTaskHandle xIdleHandle
Definition: cpu_utils.c:63
uint8_t direction
Definition: UsbCore.h:185
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
Definition: usbh_def.h:337
Definition: usbh_def.h:362
uint16_t osGetCPUUsage(void)
Stop Idle monitor.
Definition: cpu_utils.c:139
uint8_t * buff
Definition: usbh_def.h:409
Definition: usbh_def.h:371
USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost)
Return the USB host speed from the low level driver.
Definition: usbh_conf.c:314
uint8_t bDeviceClass
Definition: usbh_def.h:242
Definition: usbh_def.h:367
#define HOST_USER_SELECT_CONFIGURATION
Definition: usbh_core.h:64
uint8_t bLength
Definition: usbh_def.h:288
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
uint8_t bNumEndpoints
Definition: usbh_def.h:276
#define USB_DESC_TYPE_ENDPOINT
Definition: usbd_def.h:99
USBH_StatusTypeDef USBH_ClrFeature(USBH_HandleTypeDef *phost, uint8_t ep_num)
USBH_ClrFeature This request is used to clear or disable a specific feature.
Definition: usbh_ctlreq.c:308
Definition: usbh_def.h:348
USBH_StatusTypeDef USBH_LL_SubmitURB(USBH_HandleTypeDef *phost, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t *, uint16_t, uint8_t)
Submit a new URB to the low level driver.
Definition: usbh_conf.c:475
Definition: usbh_def.h:365
void vApplicationIdleHook(void)
Application Idle Hook.
Definition: cpu_utils.c:75
uint16_t osGetCPUUsage(void)
Stop Idle monitor.
Definition: cpu_utils.c:139
#define osThreadDef(name, thread, priority, instances, stacksz)
Definition: cmsis_os.h:468
Header file for usbh_core.c.
uint8_t current_interface
Definition: usbh_def.h:428
USBH_StatusTypeDef USBH_RegisterClass(USBH_HandleTypeDef *phost, USBH_ClassTypeDef *pclass)
USBH_RegisterClass Link class driver to Host Core.
Definition: usbh_core.c:199
uint8_t USBH_AllocPipe(USBH_HandleTypeDef *phost, uint8_t ep_addr)
USBH_Alloc_Pipe Allocate a new Pipe.
Definition: usbh_pipes.c:138
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
Definition: usbh_def.h:387
USBH_InterfaceDescTypeDef Itf_Desc[USBH_MAX_NUM_INTERFACES]
Definition: usbh_def.h:296
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
uint8_t bRequest
Definition: usbh_def.h:222
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
static USBH_StatusTypeDef USBH_HandleControl(USBH_HandleTypeDef *phost)
USBH_HandleControl Handles the USB control transfer state machine.
Definition: usbh_ctlreq.c:581
USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
USBH_CtlSendData Sends a data Packet to the Device.
Definition: usbh_ioreq.c:126
USBH_StatusTypeDef USBH_ReEnumerate(USBH_HandleTypeDef *phost)
HCD_ReEnumerate Perform a new Enumeration phase.
Definition: usbh_core.c:371
USBH_StatusTypeDef USBH_CtlSendSetup(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t pipe_num)
USBH_CtlSendSetup Sends the Setup Packet to the Device.
Definition: usbh_ioreq.c:100
USBH_EpDescTypeDef Ep_Desc[USBH_MAX_NUM_ENDPOINTS]
Definition: usbh_def.h:281
#define USBH_PID_DATA
Definition: usbh_ioreq.h:59
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
#define USB_REQ_CLEAR_FEATURE
Definition: usbd_def.h:84
Header file for usbh_pipes.c.
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
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
#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
PRIVILEGED_FUNCTION TickType_t xTaskGetTickCountFromISR(void)
Definition: tasks.c:2142
USBH_StatusTypeDef USBH_LL_DriverVBUS(USBH_HandleTypeDef *phost, uint8_t)
Drive VBUS.
Definition: usbh_conf.c:532
uint8_t USBH_GetActiveClass(USBH_HandleTypeDef *phost)
USBH_GetActiveClass Return Device Class.
Definition: usbh_core.c:260
uint8_t i
Definition: screen_test_graph.c:72
Header file for usbh_ioreq.c.
Definition: usbh_def.h:350
uint16_t_uint8_t wIndex
Definition: usbh_def.h:224
USBH_StatusTypeDef(* BgndProcess)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:444
Definition: usbh_def.h:386
uint16_t length
Definition: usbh_def.h:410
uint8_t bConfigurationValue
Definition: usbh_def.h:292
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
Definition: usbh_def.h:331
Definition: usbh_def.h:334
USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t hc_num, uint8_t do_ping)
USBH_CtlSendData Sends a data Packet to the Device.
Definition: usbh_ioreq.c:126
uint16_t bcdDevice
Definition: usbh_def.h:251
#define USB_CONFIGURATION_DESC_SIZE
Definition: usbh_def.h:151
Header for cpu_utils module.
USBH_StatusTypeDef USBH_LL_OpenPipe(USBH_HandleTypeDef *phost, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint16_t)
Open a pipe of the low level driver.
Definition: usbh_conf.c:388
uint16_t bcdUSB
Definition: usbh_def.h:241
static void USBH_ParseEPDesc(USBH_EpDescTypeDef *ep_descriptor, uint8_t *buf)
USBH_ParseEPDesc This function Parses the endpoint descriptor.
Definition: usbh_ctlreq.c:452
uint8_t bDeviceProtocol
Definition: usbh_def.h:244
__IO uint32_t Timer
Definition: usbh_def.h:461
#define HOST_USER_CONNECTION
Definition: usbh_core.h:67
Definition: usbh_def.h:363
uint8_t iManufacturer
Definition: usbh_def.h:252
Definition: usbh_def.h:450
Definition: usbh_def.h:333
#define USB_REQ_SET_INTERFACE
Definition: usbd_def.h:92
#define NULL
Definition: usbd_def.h:53
void * pData
Definition: usbh_def.h:446
osStatus status
status code: event or error information
Definition: cmsis_os.h:396
static uint16_t USBH_GetFreePipe(USBH_HandleTypeDef *phost)
USBH_GetFreePipe.
Definition: usbh_pipes.c:173
USBH_CtrlTypeDef Control
Definition: usbh_def.h:455
Definition: usbh_def.h:385
uint16_t_uint8_t wValue
Definition: usbh_def.h:223
USBH_StatusTypeDef USBH_LL_ResetPort(USBH_HandleTypeDef *phost)
Reset the Host port of the low level driver.
Definition: usbh_conf.c:342
void USBH_LL_SetTimer(USBH_HandleTypeDef *phost, uint32_t time)
USBH_LL_SetTimer Set the initial Host Timer tick.
Definition: usbh_core.c:791
Definition: usbh_def.h:270
osEvent osMessageGet(osMessageQId queue_id, uint32_t millisec)
Get a Message or Wait for a Message from a Queue.
Definition: cmsis_os.c:1145
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
#define USB_DESC_STRING
Definition: usbh_def.h:160
#define USB_REQ_RECIPIENT_DEVICE
Definition: usbd_def.h:78
uint8_t id
Definition: usbh_def.h:462
#define USB_REQ_RECIPIENT_INTERFACE
Definition: usbd_def.h:79
USBH_StatusTypeDef USBH_CtlReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num)
USBH_CtlReceiveData Receives the Device Response to the Setup Packet.
Definition: usbh_ioreq.c:159
Definition: usbh_def.h:330
Definition: usbh_def.h:328
USBH_StatusTypeDef USBH_CtlReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t hc_num)
USBH_CtlReceiveData Receives the Device Response to the Setup Packet.
Definition: usbh_ioreq.c:159
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:364
#define USB_REQ_GET_DESCRIPTOR
Definition: usbd_def.h:87
Definition: usbh_def.h:259
Definition: usbh_def.h:340
USBH_StatusTypeDef USBH_Init(USBH_HandleTypeDef *phost, void(*pUsrFunc)(USBH_HandleTypeDef *phost, uint8_t), uint8_t id)
HCD_Init Initialize the HOST Core.
Definition: usbh_core.c:92
Definition: cmsis_os.h:395
USBH_StatusTypeDef(* SOFProcess)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:445
USBH_CfgDescTypeDef CfgDesc
Definition: usbh_def.h:430
#define FEATURE_SELECTOR_ENDPOINT
Definition: usbh_ctlreq.h:57
#define USBH_ADDRESS_DEFAULT
Definition: usbh_core.c:51
uint8_t bNumConfigurations
Definition: usbh_def.h:255
uint8_t bDescriptorType
Definition: usbh_def.h:289
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_PID_SETUP
Definition: usbh_ioreq.h:58
uint16_t_uint8_t wLength
Definition: usbh_def.h:225
#define USBH_PROCESS_STACK_SIZE
Definition: usbh_conf.h:133
Definition: usbh_def.h:396
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
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.
Definition: usbh_core.c:274
uint32_t osCPU_IdleStartTime
Definition: cpu_utils.c:65
#define xTaskHandle
Definition: FreeRTOS.h:826
#define USBH_SETUP_PKT_SIZE
Definition: usbh_ioreq.h:66
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
Definition: usbh_def.h:372
#define USBH_MPS_DEFAULT
Definition: usbh_core.c:53
PRIVILEGED_FUNCTION TaskHandle_t xTaskGetCurrentTaskHandle(void)
#define USBH_MAX_NUM_SUPPORTED_CLASS
Definition: usbh_conf.h:111
Definition: usbh_def.h:304
USBH_StatusTypeDef USBH_SetCfg(USBH_HandleTypeDef *phost, uint16_t cfg_idx)
USBH_SetCfg The command sets the configuration value to the connected device.
Definition: usbh_ctlreq.c:260
#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
USBH_StatusTypeDef USBH_DeInit(USBH_HandleTypeDef *phost)
HCD_Init De-Initialize the Host portion of the driver.
Definition: usbh_core.c:143
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
Definition: usbh_def.h:368
Definition: usbh_def.h:286
USBH_StatusTypeDef USBH_Process(USBH_HandleTypeDef *phost)
USBH_Process Background process of the USB Core.
Definition: usbh_core.c:397
function completed; message event occurred.
Definition: cmsis_os.h:237
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
uint32_t osCPU_IdleSpentTime
Definition: cpu_utils.c:66
uint8_t speed
Definition: usbh_def.h:426
#define USBH_DEVICE_ADDRESS
Definition: usbh_def.h:185
Definition: usbh_def.h:361
Definition: usbh_def.h:397
__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
#define USBH_EP_ISO
Definition: usbh_ioreq.h:62
Definition: usbh_def.h:352
USBH_StatusTypeDef USBH_LL_Disconnect(USBH_HandleTypeDef *phost)
USBH_LL_Disconnect Handle USB Host disconnection event.
Definition: usbh_core.c:854
USBH_StatusTypeDef(* DeInit)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:442
uint8_t bmAttributes
Definition: usbh_def.h:264
#define USBH_PROCESS_PRIO
Definition: usbh_conf.h:132
#define USBH_EP_INTERRUPT
Definition: usbh_ioreq.h:64
uint8_t iProduct
Definition: usbh_def.h:253
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
Definition: usbh_def.h:319
USBH_StatusTypeDef(* Init)(struct _USBH_HandleTypeDef *phost)
Definition: usbh_def.h:441
Definition: usbh_def.h:237
uint8_t bMaxPacketSize
Definition: usbh_def.h:248
Definition: usbh_def.h:390
uint8_t bNumInterfaces
Definition: usbh_def.h:291
USBH_StatusTypeDef USBH_BulkReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num)
USBH_BulkReceiveData Receives IN bulk packet from device.
Definition: usbh_ioreq.c:218
uint8_t bLength
Definition: usbh_def.h:239
USBH_URBStateTypeDef USBH_LL_GetURBState(USBH_HandleTypeDef *phost, uint8_t)
Get a URB state from the low level driver.
Definition: usbh_conf.c:519
uint8_t pipe_in
Definition: usbh_def.h:406
uint8_t iConfiguration
Definition: usbh_def.h:293
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.
Definition: usbh_ctlreq.c:283
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
#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
Definition: usbh_def.h:366
USBH_StatusTypeDef USBH_IsocReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint32_t length, uint8_t pipe_num)
USBH_IsocReceiveData Receives the Device Response to the Isochronous IN token.
Definition: usbh_ioreq.c:296
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
#define USBH_UsrLog(...)
Definition: usbh_conf.h:166
USBH_StatusTypeDef USBH_OpenPipe(USBH_HandleTypeDef *phost, uint8_t pipe_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_SelectInterface(USBH_HandleTypeDef *phost, uint8_t interface)
USBH_SelectInterface Select current interface.
Definition: usbh_core.c:233
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
Initialize the low level portion of the host driver.
Definition: usbh_conf.c:191
uint8_t bDescriptorType
Definition: usbh_def.h:262
struct _USB_Setup::_SetupPkt_Struc b
USBH_StatusTypeDef USBH_InterruptSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t length, uint8_t pipe_num)
USBH_InterruptSendData Sends the data on Interrupt OUT Endpoint.
Definition: usbh_ioreq.c:270
USBH_StatusTypeDef
Definition: usbh_def.h:302
USBH_StatusTypeDef USBH_LL_Connect(USBH_HandleTypeDef *phost)
USBH_LL_Connect Handle USB Host connexion event.
Definition: usbh_core.c:826
uint16_t idProduct
Definition: usbh_def.h:250
Definition: usbh_def.h:360
ENUM_StateTypeDef EnumState
Definition: usbh_def.h:453
uint8_t bMaxPower
Definition: usbh_def.h:295
USBH_StatusTypeDef USBH_IsocSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint32_t length, uint8_t pipe_num)
USBH_IsocSendData Sends the data on Isochronous OUT Endpoint.
Definition: usbh_ioreq.c:323
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...
Definition: usbh_core.c:306
uint8_t bInterfaceProtocol
Definition: usbh_def.h:279
__IO uint32_t osCPU_Usage
Definition: cpu_utils.c:64
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
#define USBH_EP_BULK
Definition: usbh_ioreq.h:63
: Header for main.c file. This file contains the common defines of the application.
uint8_t bDeviceSubClass
Definition: usbh_def.h:243
USBH_ClassTypeDef * pClass[USBH_MAX_NUM_SUPPORTED_CLASS]
Definition: usbh_def.h:457
void EndIdleMonitor(void)
Stop Idle monitor.
Definition: cpu_utils.c:124
uint16_t timer
Definition: usbh_def.h:411
uint8_t errorcount
Definition: usbh_def.h:414
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
USBH_StatusTypeDef USBH_CtlSendSetup(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t hc_num)
USBH_CtlSendSetup Sends the Setup Packet to the Device.
Definition: usbh_ioreq.c:100
uint32_t ClassNumber
Definition: usbh_def.h:459
uint8_t pipe_out
Definition: usbh_def.h:407
uint8_t iInterface
Definition: usbh_def.h:280
void * pData
Definition: usbh_def.h:463
#define CALCULATION_PERIOD
Definition: cpu_utils.h:53
void vApplicationTickHook(void)
Application Idle Hook.
Definition: cpu_utils.c:89
osMessageQId osMessageCreate(const osMessageQDef_t *queue_def, osThreadId thread_id)
Create and Initialize a Message Queue.
Definition: cmsis_os.c:1086
Definition: usbh_def.h:359
uint16_t w
Definition: usbh_def.h:204
uint8_t iSerialNumber
Definition: usbh_def.h:254
Header file for usbh_ctlreq.c.
#define USBH_MAX_DATA_BUFFER
Definition: usbh_conf.h:117
#define osMessageQ(name)
Access a Message Queue Definition.
Definition: cmsis_os.h:829
#define USB_REQ_RECIPIENT_ENDPOINT
Definition: usbd_def.h:80
USBH_DescHeader_t * USBH_GetNextDesc(uint8_t *pbuf, uint16_t *ptr)
USBH_GetNextDesc This function return the next descriptor header.
Definition: usbh_ctlreq.c:509
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
#define USB_DESC_TYPE_INTERFACE
Definition: usbd_def.h:98
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
uint16_t wTotalLength
Definition: usbh_def.h:290
#define USB_DESC_DEVICE
Definition: usbh_def.h:158
#define USBH_MAX_ERROR_COUNT
Definition: usbh_def.h:184
uint8_t bInterval
Definition: usbh_def.h:266
void(* pUser)(struct _USBH_HandleTypeDef *pHandle, uint8_t id)
Definition: usbh_def.h:464
USBH_StatusTypeDef USBH_LL_ClosePipe(USBH_HandleTypeDef *phost, uint8_t)
Close a pipe of the low level driver.
Definition: usbh_conf.c:422
const char * Name
Definition: usbh_def.h:439
#define USBH_MAX_NUM_INTERFACES
Definition: usbh_conf.h:102
#define USB_REQ_TYPE_STANDARD
Definition: usbd_def.h:73
png_uint_32 length
Definition: png.c:2247
uint8_t bDescriptorType
Definition: usbh_def.h:273
USBH_URBStateTypeDef
Definition: usbh_def.h:384
uint8_t bmRequestType
Definition: usbh_def.h:221
USBH_StatusTypeDef USBH_InterruptReceiveData(USBH_HandleTypeDef *phost, uint8_t *buff, uint8_t length, uint8_t pipe_num)
USBH_InterruptReceiveData Receives the Device Response to the Interrupt IN token.
Definition: usbh_ioreq.c:244
uint8_t bLength
Definition: usbh_def.h:261
USBH_ClassTypeDef * pActiveClass
Definition: usbh_def.h:458
static void USBH_ParseInterfaceDesc(USBH_InterfaceDescTypeDef *if_descriptor, uint8_t *buf)
USBH_ParseInterfaceDesc This function Parses the interface descriptor.
Definition: usbh_ctlreq.c:431
uint8_t bmAttributes
Definition: usbh_def.h:294
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 LE16(addr)
Definition: usbh_def.h:69
USBH_StatusTypeDef USBH_BulkSendData(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length, uint8_t pipe_num, uint8_t do_ping)
USBH_BulkSendData Sends the Bulk Packet to the device.
Definition: usbh_ioreq.c:186
#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
#define HOST_USER_UNRECOVERED_ERROR
Definition: usbh_core.h:69
uint8_t bDescriptorType
Definition: usbh_def.h:240
uint8_t bAlternateSetting
Definition: usbh_def.h:275
Definition: usbh_def.h:338
void StartIdleMonitor(void)
Start Idle monitor.
Definition: cpu_utils.c:111
uint16_t wMaxPacketSize
Definition: usbh_def.h:265
#define USB_REQ_DIR_MASK
Definition: usbh_def.h:107
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
uint8_t bEndpointAddress
Definition: usbh_def.h:263
Definition: usbh_def.h:336
Definition: usbh_def.h:307
USBH_StatusTypeDef USBH_ClosePipe(USBH_HandleTypeDef *phost, uint8_t pipe_num)
USBH_ClosePipe Close a pipe.
Definition: usbh_pipes.c:121
#define USB_LEN_CFG_DESC
Definition: usbd_def.h:59
#define USBH_MAX_PIPES_NBR
Definition: usbh_def.h:180
#define osThread(name)
Definition: cmsis_os.h:478
uint32_t d8[2]
Definition: usbh_def.h:217
uint8_t bLength
Definition: usbh_def.h:272
uint8_t bInterfaceClass
Definition: usbh_def.h:277
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:369
#define osMessageQDef(name, queue_sz, type)
Create a Message Queue Definition.
Definition: cmsis_os.h:818
Definition: usbh_def.h:437
Definition: usbh_def.h:370
void USBH_LL_IncTimer(USBH_HandleTypeDef *phost)
USBH_LL_IncTimer Increment Host Timer tick.
Definition: usbh_core.c:801