Skip to content
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

Clean up USB exercise #148

Open
1 of 7 tasks
jonathanpallant opened this issue Dec 6, 2024 · 2 comments
Open
1 of 7 tasks

Clean up USB exercise #148

jonathanpallant opened this issue Dec 6, 2024 · 2 comments
Assignees

Comments

@jonathanpallant
Copy link
Member

jonathanpallant commented Dec 6, 2024

  • "HEADS UP to use your USB packet parser uncomment line 12 and remove line 13" those line numbers are wrong
  • "SETUP: bmrequesttype: {}, brequest: {}, wlength: {}, windex: {}, wvalue: {}" could use some better formatting
  • consts::VID should be consts::USB_VID_DEMO
  • consts::PID should be consts::USB_PID_RTIC_DEMO
  • We should use pid.codes Test PIDs, like 0x000A, 0x000B and 0x000C, not random ones (we might collide with another pid.codes product in the future)
  • fn on_event et al, don't need to be inside the macro
  • the usbd module could be a struct with methods. Then people won't be tempted to try and read the registers by hand, when there are methods that do it for them.
@jonathanpallant jonathanpallant self-assigned this Dec 6, 2024
@jonathanpallant
Copy link
Member Author

The formatting of the messages is better in #152

@jonathanpallant
Copy link
Member Author

the usbd module could be a struct with methods. Then people won't be tempted to try and read the registers by hand, when there are methods that do it for them.

Or really, we could use the usb-device crate to do most of the heavy lifting. Then all the attendees need to do is share a usb-device with a task bound to USBD, and call usb_device.poll(). This is what the dongle firmware now does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant