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

writeln support #106

Closed
pdgilbert opened this issue Jun 14, 2020 · 1 comment · Fixed by #278
Closed

writeln support #106

pdgilbert opened this issue Jun 14, 2020 · 1 comment · Fixed by #278
Labels
enhancement New feature or request

Comments

@pdgilbert
Copy link

It would be nice to have support for writeln! ( which comes with "use core::fmt::Write;" ). I think this is done in stm32f1xx-hal and stm32f4xx-hal by implementing a trait. I'm a newbie, so probably wrong about how it is done, but I do know it works with those two hals and not with stmf3xx-hal.

@teskje
Copy link
Collaborator

teskje commented Jul 15, 2020

Looks like they simply implement core::fmt::Write for their serial tx type: https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/serial.rs#L1763

We have such a type as well, just implemented inside a macro (Tx<$USARTX>). It should be very easy to impl Write for it too.

@Sh3Rm4n Sh3Rm4n added the enhancement New feature or request label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants