rust-exercises
rust-exercises copied to clipboard
Clean up USB exercise
- [ ] "HEADS UP to use your USB packet parser uncomment line 12 and remove line 13" those line numbers are wrong
- [x]
"SETUP: bmrequesttype: {}, brequest: {}, wlength: {}, windex: {}, wvalue: {}"could use some better formatting - [ ]
consts::VIDshould beconsts::USB_VID_DEMO - [ ]
consts::PIDshould beconsts::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_eventet al, don't need to be inside the macro - [ ] the
usbdmodule 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.
The formatting of the messages is better in #152
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.