Skip to content

Tracking: Porting embassy-rs for libtock-rs #576

@DanutAldea

Description

@DanutAldea

I am currently working on porting the Embassy executor along with extending capsule API with async methods that implement the embedded-hal-async traits.

Roadmap

  • Port the embassy-executor to include a arch-tock target.
  • Extend the libtock-rs::share module to export an async_scope method to be used in capsule async APIs.
  • Convert the userspace-level critical-section implementation in demos/st7789-slint into a crate feature.
  • Implement async GPIO trait.
  • Modify the embassy-time and embassy-time-driver crates to allow for the timer frequency to be determined at runtime.
  • Implement async Timer using the embassy-time interface.
  • Extend Tock I2C capsule command interface to include a clear separation between an in place write-read command, and a write-read command that uses a separate read-only "write" buffer and read-write "read" buffer, as well as modify the write command to use a read-only buffer.
  • Modify the libtock-rs I2C controller API to use the new convention.
  • Modify the libtock-c I2C controller API to use the new convention.
  • Implement async I2C controller.
  • Implement async Console API.
  • Implement async SPI controller.
  • Add demos both in libtock-rs and embassy/examples.

Encountered Issues

  • The design contract of the I2c trait exported by embedded-hal-async is incompatible with the I2cMaster trait used by the HIL.

Upstreaming roadmap

This part is important, as these crates and examples will have inter-dependencies.

  • Create a Pull Request to Tock with the mentioned I2C modifications.
  • Publish embassy and libtock-rs public forks containing the respective modifications that reference each other.
  • Merge the changes into both upstream repositories.
  • Change the dependencies to reference the main repositories, instead of the forks.

These should ensure that the modifications are testable from both sides at every step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions