| Documentation |
|---|
| Related products |
|---|
| USB-I2C/SPI/GPIO Adapter - U2C-12 |
| USB-IO Interface Adapter - GPIO-12 |
Bootloader uses HID protocol to interact with PC software. We provide fw_update program that sends user-mode application to bootloader.
; HID Class-Specific Descriptor included in configuration
USB_HID_DESC
USB_HID_DESC_bLength db (USB_HID_DESC_end - USB_HID_DESC)
; Size
USB_HID_DESC_bDscType db DSC_HID ; HID descriptor type
USB_HID_DESC_bcdHID dw 0x0101 ; HID Spec Release Number in BCD format
USB_HID_DESC_bCountryCode db 0x00 ; Country Code
; (0x00 for Not supported)
USB_HID_DESC_bNumDsc db HID_NUM_OF_DSC ; Number of class descriptors
USB_HID_DESC_HDR_bDscType db DSC_RPT ; Report descriptor type
USB_HID_DESC_wDscLength dw (USB_HID_RPT_end - USB_HID_RPT)
; Size of the report descriptor
USB_HID_DESC_end
HID Report Descriptor is defined in the same file:
;------------------------------------------------------
; Report descriptor
USB_HID_RPT
db 0x05, 0x0C ; Usage Page (Consumer devices)
db 0x09, 0x00 ; Usage (unassigned)
db 0xA1, 0x02 ; Collection (datalink)
db 0x09, 0x00 ; Usage (unassigned)
db 0x95, HID_IN_EP_SIZE ; report count 8
db 0x75, 0x08 ; report size 8
db 0x81, 0x00 ; input
db 0x09, 0x00 ; Usage (unassigned)
db 0x95, HID_OUT_EP_SIZE ; report count 8
db 0x75, 0x08 ; report size 8
db 0x91, 0x00 ; output
db 0xC0 ; End Collection
USB_HID_RPT_end
HID requests are processed by usb_sm_HID_request subprogram.
Bootloader supports the following HID requests:
with this request HOST determines the type and number of supported reports.
with this request host transfers data to bootloader.