Tobias Müller
0409f985b5
Don't count interfaces with alternate settings multiple times
3 years ago
Kate Temkin
9fecaacef4
Merge pull request #17 from mubes/hid_descriptor
Minimal change to allow support of HID descriptors
3 years ago
Kate Temkin
03200d0a91
Merge pull request #16 from miek/descriptor_collection
descriptors: pass descriptor collection to ConfigurationDescriptorEmitter
3 years ago
Dave Marples
5fdadd823f
Minimal change to allow support of HID descriptors
3 years ago
Mike Walters
b4ca79656b
descriptors: pass descriptor collection to ConfigurationDescriptorEmitter
This allows for downstream descriptor emitters to add indexed strings.
fixes #15
3 years ago
Kate Temkin
56831fba4a
Merge pull request #14 from hansfbaier/uac2
Implement useable subset of USB Audio Class 2 (Audio + MIDI)
3 years ago
Hans Baier
5ad0368097
add MIDI Streaming Descriptors
3 years ago
Hans Baier
4a21eef601
implement useable subset of USB Audio Class 2.0
3 years ago
Kate Temkin
2f8c2a8dc5
Merge pull request #12 from Qyriad/fixes/rename-construct.py
rename construct.py to fix unittest imports
3 years ago
Mikaela Szekely
2b3ff029e8
rename construct.py to fix unittest imports
3 years ago
Katherine Temkin
dddc5cfe99
usb3: add some SuperSpeed BOS device capability descriptors
4 years ago
Kate Temkin
8b189b8742
Merge pull request #9 from Qyriad/fixes/partial-descriptors
descriptors: add types.descriptors.partial for parsing potentially incomplete data
4 years ago
Mikaela Szekely
a4130d3102
descriptors: add types.descriptors.partial for parsing potentially incomplete data
This re-allows parsing partial descriptors, which had previously been allowed until
7672fb5221
.
4 years ago
Katherine Temkin
9fc29f0369
descriptors: extend to include some SuperSpeed content
4 years ago
Katherine Temkin
2bf3bdd8d1
types.usb3: fix flipped LUP/LDN (never trust a book)
4 years ago
Katherine Temkin
171a1373fe
types: add basic SuperSpeed types
4 years ago
Mikaela Szekely
2e78bb6739
emitters: restore default bLength for endpoint descriptors
a0ceb18c89
broke this.
4 years ago
Kate Temkin
bf678266e3
Merge pull request #8 from Qyriad/fixes/audio-endpoint-descriptor
types.descriptors: handle Audio 1.0 endpoint descriptors
4 years ago
Mikaela Szekely
a0ceb18c89
types.descriptors: handle Audio 1.0 endpoint descriptors
4 years ago
Kate Temkin
fb56782455
Merge pull request #7 from Qyriad/fixes/config-without-endpoints
emitters: allow endpoint-less configurations
4 years ago
Mikaela Szekely
78d67ca8d1
emitters: allow endpoint-less configurations
4 years ago
Katherine Temkin
26c9cf0e01
types,emitters: add basic CDC-ACM descriptors and emitters
4 years ago
Kate Temkin
414778ad3e
Merge pull request #4 from dokthar/fix_strdesc
Fix DeviceDescriptorCollection always adding a language descriptor
4 years ago
Kate Temkin
37371d8f39
Merge pull request #5 from dokthar/fix_bcd
fix BCD fields encoding
4 years ago
dokthar
1d1408cb49
fix BCD fields encoding
For some case the encode function was raising AssertionError despite
the BCD value beeing correct (in this case it was 1.11).
There is two main modification in the version I propose:
First the added rounding before converting the "percent" to an integer.
This may seems odd but it is actually to "correct" the error introduce
by the multiplication.
Second the comparison is done "after" conversion by recreating the
floating point value from the integer and percent variables. This is to
make sure that the value in the descriptor is the same as intended.
I've made sure that all correct values (that can be stored in bcd fields)
doesn't raise an error when passed to the encode function.
I've used the following program to test the new implementation:
```
for obj in [float(f"{i:02}.{p:02}") for i in range(100) for p in range(100)]:
integer = int(obj) % 100
percent = int(round(obj * 100)) % 100
if float(f"{integer:02}.{percent:02}") != obj:
print (f"BCD conversion error: {integer:02}.{percent:02} != {obj}")
```
4 years ago
dokthar
a922fe07f9
emitters: add test for automatic language descriptor
4 years ago
dokthar
5b9c2e6656
emitters: fix for automatic language descriptors
4 years ago
Kate Temkin
9634fc940b
emitters: add support for language string descriptors
4 years ago
Kate Temkin
21ba0397f7
fix issues with descriptor length field & make emitters easier to access
4 years ago
Kate Temkin
4f26131509
add examples
4 years ago
Kate Temkin
7672fb5221
add complex emitters for building USB descriptors
4 years ago
Kate Temkin
708f838dc1
commit first working code, with descriptor parsers/emitters
4 years ago
Kate Temkin
667118879e
initial commit: import descriptor definitions and basic types from ViewSB
4 years ago