-
Notifications
You must be signed in to change notification settings - Fork 24
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 Mouse HID example? #10
Comments
I can confirm that the linked code keyseebee is functional, tested yesterday on real hardware on a stm33f072. |
Argh, sorry @TeXitoi, didn't mean to say yours does not work ;) After trying to add = note: rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 12 bytes
rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 36 bytes
rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 36 bytes As a result, I'm just reading Ferrous systems announcements now: https://ferrous-systems.com/blog/21st-century-embedded-tooling/ Learning, catching up and chasing (minimal) examples I can use right away for my usecase, that's all ;) |
I didn't know if it works 24h ago ;-) and I said to someone on matrix that it was untested, so I just clarify that I now know that it works. Don't use hprintln, it's really too slow and will kill USB timing. Also, it will just not work without a debug probe plugged. Use --release, default debug build are almost unusable on embedded because of code bloat (size of the generated code) and it's really slow (by more that 10 times). |
An USB example would be a great addition. |
I have a remote controlled USB mediakeyboard example here. https://github.com/jkristell/infrared-examples/blob/master/stm32f103-bluepill/examples/mediakeyboard.rs A bit rough, but it does work with Linux. If I find the time I will try to make it act as a usb mouse as well. |
Cool! Please create a PR if you find the time, always nice with many examples of usage. |
Perhaps based on some combination of the following resources:
https://gitlab.com/TheZoq2/hotas
https://github.com/TeXitoi/keyseebee/blob/master/firmware/src/main.rs
https://github.com/agalakhov/usbd-hid-device-example/blob/master/src/main.rs
https://github.com/atsamd-rs/atsamd/blob/master/boards/itsybitsy_m0/examples/twitching_usb_mouse.rs
https://github.com/jamesmunns/OtterPill-rs/blob/master/split-mouse/src/main.rs
https://github.com/jamesmunns/OtterPill-rs/tree/master/hello-mouse
I have been trying with a STM32F042 IC over here (can't figure out why the USB device is not enumerating at the time of writing this):
https://gist.github.com/brainstorm/5affbf3689dec0c0f03d550a95200dfd
The text was updated successfully, but these errors were encountered: