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

USB Mouse HID example? #10

Closed
brainstorm opened this issue Aug 16, 2020 · 6 comments · Fixed by #12
Closed

USB Mouse HID example? #10

brainstorm opened this issue Aug 16, 2020 · 6 comments · Fixed by #12

Comments

@TeXitoi
Copy link

TeXitoi commented Aug 16, 2020

I can confirm that the linked code keyseebee is functional, tested yesterday on real hardware on a stm33f072.

@brainstorm
Copy link
Contributor Author

brainstorm commented Aug 16, 2020

Argh, sorry @TeXitoi, didn't mean to say yours does not work ;)

After trying to add hprintln! my gist example went:

  = 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/
https://ferrous-systems.com/blog/probe-run/
https://ferrous-systems.com/blog/knurling-rs/

Learning, catching up and chasing (minimal) examples I can use right away for my usecase, that's all ;)

@TeXitoi
Copy link

TeXitoi commented Aug 16, 2020

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).

@korken89
Copy link
Contributor

An USB example would be a great addition.
I do not have any relevant USB experience, but maybe someone feels up to the task? :)

@jkristell
Copy link

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.

bors bot added a commit that referenced this issue Sep 29, 2020
12: Add HID mouse example r=AfoHT a=brainstorm

fixes #10 

Co-authored-by: Roman Valls Guimera <brainstorm@nopcode.org>
@bors bors bot closed this as completed in 362a00f Sep 29, 2020
@AfoHT
Copy link
Contributor

AfoHT commented Sep 29, 2020

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.

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

Successfully merging a pull request may close this issue.

5 participants