New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usb/hid: Add HID report descriptor defines #17242
usb/hid: Add HID report descriptor defines #17242
Conversation
da9cb1b
to
db113e1
Compare
Compile and check sessionkoen@zometeen ~/dev/RIOT-dev $ git checkout pr/hid/add_descriptor_defines
Already on 'pr/hid/add_descriptor_defines'
Your branch is up to date with 'origin/pr/hid/add_descriptor_defines'.
koen@zometeen ~/dev/RIOT-dev $ RIOT_CI_BUILD=1 make -C tests/usbus_hid/ BOARD=samr21-xpro
make: Entering directory '/home/koen/dev/RIOT-dev/tests/usbus_hid'
Building application "tests_usbus_hid" for "samr21-xpro" with MCU "samd21".
text data bss dec hex filename
17868 148 4508 22524 57fc /home/koen/dev/RIOT-dev/tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.elf
Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!
MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!
make: Leaving directory '/home/koen/dev/RIOT-dev/tests/usbus_hid'
koen@zometeen ~/dev/RIOT-dev $ sha256sum tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.bin
31d5535dcef87945c74de8df6f2948738a88d960154c3e65f0d1a7c9aac79641 tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.bin
koen@zometeen ~/dev/RIOT-dev $ RIOT_CI_BUILD=1 make -C tests/sys_fido2_ctap BOARD=samr21-xpro
make: Entering directory '/home/koen/dev/RIOT-dev/tests/sys_fido2_ctap'
Building application "tests_sys_fido2_ctap" for "samr21-xpro" with MCU "samd21".
[INFO] cloning fido2_tests
Cloning into '/home/koen/dev/RIOT-dev/build/pkg/fido2_tests'...
remote: Enumerating objects: 855, done.
remote: Counting objects: 100% (220/220), done.
remote: Compressing objects: 100% (154/154), done.
remote: Total 855 (delta 131), reused 127 (delta 63), pack-reused 635
Receiving objects: 100% (855/855), 174.77 KiB | 8.32 MiB/s, done.
Resolving deltas: 100% (508/508), done.
HEAD is now at 3f7893d call reset to make tests repeatable
[INFO] updating fido2_tests /home/koen/dev/RIOT-dev/build/pkg/fido2_tests/.pkg-state.git-downloaded
echo 3f7893d8d1a39b009cddad7913d3808ca664d3b7 > /home/koen/dev/RIOT-dev/build/pkg/fido2_tests/.pkg-state.git-downloaded
[INFO] patch fido2_tests
[INFO] cloning micro-ecc
Cloning into '/home/koen/dev/RIOT-dev/build/pkg/micro-ecc'...
remote: Enumerating objects: 1143, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 1143 (delta 21), reused 28 (delta 9), pack-reused 1095
Receiving objects: 100% (1143/1143), 687.07 KiB | 8.08 MiB/s, done.
Resolving deltas: 100% (664/664), done.
HEAD is now at 4b1709c Merge pull request #176 from benpicco/riot
[INFO] updating micro-ecc /home/koen/dev/RIOT-dev/build/pkg/micro-ecc/.pkg-state.git-downloaded
echo 4b1709c17abbe938d6d8811f4c7c5d082a144799 > /home/koen/dev/RIOT-dev/build/pkg/micro-ecc/.pkg-state.git-downloaded
[INFO] patch micro-ecc
[INFO] cloning tiny-asn1
Cloning into '/home/koen/dev/RIOT-dev/build/pkg/tiny-asn1'...
remote: Enumerating objects: 327, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 327 (delta 3), reused 3 (delta 0), pack-reused 314
Receiving objects: 100% (327/327), 85.77 KiB | 1.59 MiB/s, done.
Resolving deltas: 100% (194/194), done.
HEAD is now at 7005fcf Merge branch '2-pipeline-status-badge-is-broken' into 'develop'
[INFO] updating tiny-asn1 /home/koen/dev/RIOT-dev/build/pkg/tiny-asn1/.pkg-state.git-downloaded
echo 7005fcff4706e96b857f257ef94b8518211c9fbc > /home/koen/dev/RIOT-dev/build/pkg/tiny-asn1/.pkg-state.git-downloaded
[INFO] patch tiny-asn1
[INFO] cloning tinycbor
Cloning into '/home/koen/dev/RIOT-dev/build/pkg/tinycbor'...
remote: Enumerating objects: 3024, done.
remote: Counting objects: 100% (225/225), done.
remote: Compressing objects: 100% (110/110), done.
remote: Total 3024 (delta 143), reused 177 (delta 115), pack-reused 2799
Receiving objects: 100% (3024/3024), 1.42 MiB | 5.30 MiB/s, done.
Resolving deltas: 100% (2038/2038), done.
HEAD is now at 755f9ef Parser: validate that maps have both key and value items
[INFO] updating tinycbor /home/koen/dev/RIOT-dev/build/pkg/tinycbor/.pkg-state.git-downloaded
echo 755f9ef932f9830a63a712fd2ac971d838b131f1 > /home/koen/dev/RIOT-dev/build/pkg/tinycbor/.pkg-state.git-downloaded
[INFO] patch tinycbor
text data bss dec hex filename
52444 248 30532 83224 14518 /home/koen/dev/RIOT-dev/tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.elf
Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!
MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!
make: Leaving directory '/home/koen/dev/RIOT-dev/tests/sys_fido2_ctap'
koen@zometeen ~/dev/RIOT-dev $ sha256sum tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.bin
132981dc6fbe38482b8964d82e82883c0f76e32a23f761390d36d6466c1c5f70 tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.bin
koen@zometeen ~/dev/RIOT-dev $ git checkout upstream/master
HEAD is now at 09e0692a85 Merge pull request #17201 from bergzand/pr/nrf5x/periph_qdec
koen@zometeen ~/dev/RIOT-dev $ RIOT_CI_BUILD=1 make -C tests/usbus_hid/ BOARD=samr21-xpro
make: Entering directory '/home/koen/dev/RIOT-dev/tests/usbus_hid'
Building application "tests_usbus_hid" for "samr21-xpro" with MCU "samd21".
text data bss dec hex filename
17868 148 4508 22524 57fc /home/koen/dev/RIOT-dev/tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.elf
Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!
MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!
make: Leaving directory '/home/koen/dev/RIOT-dev/tests/usbus_hid'
koen@zometeen ~/dev/RIOT-dev $ sha256sum tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.bin
31d5535dcef87945c74de8df6f2948738a88d960154c3e65f0d1a7c9aac79641 tests/usbus_hid/bin/samr21-xpro/tests_usbus_hid.bin
koen@zometeen ~/dev/RIOT-dev $ RIOT_CI_BUILD=1 make -C tests/sys_fido2_ctap BOARD=samr21-xpro
make: Entering directory '/home/koen/dev/RIOT-dev/tests/sys_fido2_ctap'
Building application "tests_sys_fido2_ctap" for "samr21-xpro" with MCU "samd21".
text data bss dec hex filename
52444 248 30532 83224 14518 /home/koen/dev/RIOT-dev/tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.elf
Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!
MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!
make: Leaving directory '/home/koen/dev/RIOT-dev/tests/sys_fido2_ctap'
koen@zometeen ~/dev/RIOT-dev $ sha256sum tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.bin
132981dc6fbe38482b8964d82e82883c0f76e32a23f761390d36d6466c1c5f70 tests/sys_fido2_ctap/bin/samr21-xpro/tests_sys_fido2_ctap.bin |
636cf6e
to
7d7b70b
Compare
I've excluded the usage tables themselves from doxygen. I don't think it adds anything to have them in doxygen and they will only cause warnings. The other solution is to comment them all with something obvious and I think that decreases the already bad readability of the header file. |
Something is broke. |
Okay master also doesn't work. The hid report descriptor looks fine and this is the only thing that affects the FIDO2 code. |
Maybe I messed something up in one of my later pushes. Do you have time to check if things still work with current master? Otherwise I will investigate later
Thanks for investigating! Could be that #17230 caused some unwelcome side effects. |
Thanks for the pointer :) Will investigate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few mistakes spotted.
And I didn't look at hid_usage.h yet. It might take some time...
/** | ||
* @brief Physical collection type | ||
*/ | ||
#define USB_HID_COLLECTION_PHYSICAL 0x00 | ||
|
||
/** | ||
* @brief Application collection type | ||
*/ | ||
#define USB_HID_COLLECTION_APPLICATION 0x01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reasons not to declare
USB_HID_COLLECTION_LOGICAL
USB_HID_COLLECTION_REPORT
... and so on ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, added them.
ping @bergzand |
Please squash. |
Content of the HID report descriptor itself is unchanged
Content of the HID report descriptor itself is unchanged
bfe742d
to
8ea334d
Compare
Squashed |
Contribution description
This PR adds a bunch of defines to help create USB HID report descriptors.
Testing procedure
Check the doxygen
Binaries of:
Should be unchanged
Issues/PRs references
None