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

feat(examples): add usb-serial example #328

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

kaspar030
Copy link
Collaborator

@kaspar030 kaspar030 commented Jun 27, 2024

Description

This adds a usb serial example.
It is basically a port of one of Embassy's examples.

I tested that it works, with Linux as host, on nrf52840dk, rpi-pico and two stm32 (which are not in main yet).

Issues/PRs references

Open Questions

Change checklist

  • I have cleaned up my commit history and squashed fixup commits.
  • I have followed the Coding Conventions.
  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.

@kaspar030 kaspar030 requested a review from bergzand June 27, 2024 08:00
@kaspar030 kaspar030 added this to the First Release milestone Jul 1, 2024
examples/usb-serial/src/main.rs Outdated Show resolved Hide resolved
examples/usb-serial/Cargo.toml Outdated Show resolved Hide resolved
@ROMemories
Copy link
Collaborator

ROMemories commented Jul 1, 2024

Maybe we could print/log the data rate?


The following

info!("Data rate: {} bauds", class.line_coding().data_rate());

gives me 8000 bauds.

@ROMemories ROMemories disabled auto-merge July 1, 2024 12:28
@kaspar030
Copy link
Collaborator Author

gives me 8000 bauds.

I digged a bit, IMO that can just be ignored.

upstream code says so. Also, the baud rate can only be set from the host.

@kaspar030 kaspar030 added this pull request to the merge queue Jul 2, 2024
Merged via the queue into future-proof-iot:main with commit e44eaca Jul 2, 2024
16 checks passed
@kaspar030 kaspar030 deleted the add_usb_serial_example branch July 2, 2024 09:08
@ROMemories ROMemories added the USB label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants