| Electronic Components Datasheet Search |
|
UM0463 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0463 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 30 page ![]() The USB state machine of the control endpoint UM0463 10/30 3.2 Data structure for the SETUP packet When a new SETUP packet arrives, all eight bytes of the SETUP packet are copied to an internal structure sUSB_vSetup, so that the next SETUP packet does not overwrite the previous one during processing. This internal structure is defined as: typedef struct USB_vSetup { unsigned char USBbmRequestType; unsigned char USBbRequest; WORD_BYTE USBwValues; WORD_BYTE USBwIndexes; WORD_BYTE USBwLengthes; unsigned char Flag; } _USB_VSETUP; _USB_VSETUP sUSB_vSetup; This structure is used in the library and is used in the user code of the USB callback functions. Referring to Table 9-2 of the USB specification [1], each field of the structure corresponds to a SETUP field. The bitmap of the flag field in the structure is designed to shorten the code size. Table 6 shows the corresponding meaning in each bit and it is set during the copy of the SETUP packet. Table 5. SETUP packet fields Field in SETUP packet Software name with the defined structure bmRequestType sUSB_vSetup.USBbmRequestType bRequest sUSB_vSetup.USBbRequest wValue sUSB_vSetup.USBwValue High byte of wValue sUSB_vSetup.USBwValue1 Low byte of wValue sUSB_vSetup.USBwValue0 wIndex sUSB_vSetup.USBwIndex High byte of wIndex sUSB_vSetup.USBwIndex1 Low byte of wIndex sUSB_vSetup.USBwIndex0 wLength sUSB_vSetup.USBwLength High byte of wLength sUSB_vSetup.USBwLength1 Low byte of wLength sUSB_vSetup.USBwLength0 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |