GithubHelp home page GithubHelp logo

Comments (3)

jannic avatar jannic commented on July 28, 2024

I guess you the title contains a typo and should read embedded_hal::blocking::serial::Write?
That's indeed not implemented. I doubt anyone plans adding it, given that it's from embedded_hal 0.2, and embedded_hal 1.0 does no longer contain this function.

But there is a function write_full_blocking that looks like it does exactly what you need: A blocking write to a serial port. Is there anything missing from that function?
https://docs.rs/rp2040-hal/latest/rp2040_hal/uart/struct.UartPeripheral.html#method.write_full_blocking
https://docs.rs/rp2040-hal/latest/rp2040_hal/uart/struct.Writer.html#method.write_full_blocking

from rp-hal.

gauteh avatar gauteh commented on July 28, 2024

Yes, but I can't use that one generically from defmt-serial. I'll look into whether eh1 has everything I need.

from rp-hal.

jannic avatar jannic commented on July 28, 2024

If you want to use a trait, on the main branch UartPeripheral implements embedded_io::Write, which has a method write_all.
https://docs.rs/embedded-io/latest/embedded_io/trait.Write.html#method.write_all

embedded_io is more or less the official replacement for the serial functions missing from embedded-hal 1.0.

from rp-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.