etc.git


etc

~ scripts and random things
git clone https://github.com/djnnvx/etc.git
log | files | refs | archive

usb.dict (2520B)

      1 # USB descriptor type bytes
      2 dt_device="\x01"
      3 dt_config="\x02"
      4 dt_string="\x03"
      5 dt_interface="\x04"
      6 dt_endpoint="\x05"
      7 dt_qualifier="\x06"
      8 dt_other_speed="\x07"
      9 dt_interface_power="\x08"
     10 dt_bos="\x0f"
     11 dt_device_capability="\x10"
     12 dt_ss_endpoint_companion="\x30"
     13 dt_iad="\x0b"
     14 
     15 # Standard descriptor sizes as bLength values
     16 blen_device="\x12"
     17 blen_config="\x09"
     18 blen_interface="\x09"
     19 blen_endpoint="\x07"
     20 blen_endpoint_audio="\x09"
     21 blen_bos="\x05"
     22 blen_devcap_min="\x03"
     23 blen_iad="\x08"
     24 
     25 # BOS device capability types
     26 bt_wireless_usb="\x01"
     27 bt_usb20_ext="\x02"
     28 bt_ss_devcap="\x03"
     29 bt_container_id="\x04"
     30 bt_platform="\x05"
     31 bt_ptm="\x06"
     32 bt_ssplus="\x0a"
     33 
     34 # USB 2.0 extension capability size (7 bytes)
     35 blen_usb20_ext="\x07"
     36 # SuperSpeed capability size (10 bytes)
     37 blen_ss_cap="\x0a"
     38 # Container ID size (20 bytes)
     39 blen_container_id="\x14"
     40 # Platform descriptor minimum size (20 bytes) — exact value triggers underflow
     41 blen_platform_min="\x14"
     42 # bLength values just below/above the platform underflow threshold
     43 blen_platform_under1="\x13"
     44 blen_platform_under2="\x12"
     45 blen_platform_above="\x15"
     46 
     47 # Interesting bLength values (boundaries)
     48 blen_zero="\x00"
     49 blen_one="\x01"
     50 blen_two="\x02"
     51 blen_max="\xff"
     52 
     53 # wTotalLength values (little-endian 16-bit)
     54 wtotal_9="\x09\x00"
     55 wtotal_18="\x12\x00"
     56 wtotal_32="\x20\x00"
     57 wtotal_255="\xff\x00"
     58 wtotal_zero="\x00\x00"
     59 wtotal_one="\x01\x00"
     60 wtotal_max="\xff\xff"
     61 wtotal_intmax="\xff\x7f"
     62 
     63 # bNumInterfaces / bNumEndpoints limits
     64 bnum_zero="\x00"
     65 bnum_one="\x01"
     66 bnum_max_ifaces="\x20"
     67 bnum_max_endpoints="\x20"
     68 bnum_255="\xff"
     69 
     70 # Config descriptor header (bLength=9, bDescriptorType=0x02)
     71 config_header="\x09\x02"
     72 # Config with wTotalLength=9 (empty — no interfaces)
     73 config_empty="\x09\x02\x09\x00\x00\x00\x00\x80\x00"
     74 # Config with wTotalLength=0xFFFF
     75 config_wtotal_max="\x09\x02\xff\xff"
     76 
     77 # Interface descriptor header (bLength=9, bDescriptorType=0x04)
     78 iface_header="\x09\x04"
     79 # Endpoint bulk-out header (bLength=7, bDescriptorType=0x05)
     80 endpoint_bulk_out="\x07\x05\x01\x02"
     81 # Endpoint interrupt-in
     82 endpoint_interrupt_in="\x07\x05\x81\x03"
     83 
     84 # BOS header (bLength=5, bDescriptorType=0x0F)
     85 bos_header="\x05\x0f"
     86 # BOS with wTotalLength=5 (no capabilities)
     87 bos_empty="\x05\x0f\x05\x00\x00"
     88 
     89 # IAD header (bLength=8, bDescriptorType=0x0B)
     90 iad_header="\x08\x0b"
     91 
     92 # Endpoint type bits in bmAttributes
     93 ep_control="\x00"
     94 ep_isoch="\x01"
     95 ep_bulk="\x02"
     96 ep_interrupt="\x03"
     97 
     98 # USB speed constants
     99 speed_low="\x01"
    100 speed_full="\x02"
    101 speed_high="\x03"
    102 speed_super="\x05"
    103 speed_super_plus="\x06"