Skip to content

Support for asynchronous I/O #50

Open
@TilBlechschmidt

Description

@TilBlechschmidt

I am currently experimenting with the nRF52 and using the embassy project. I intend to use an SD Card in the project. However, this library does not appear to support asynchronous APIs. This includes two levels:

  1. DMA related SPI store/fetch operations
  • You give it a tx+rx buffer, it at some point interrupts you once everything has been sent/received
  • Allows the user/application to do other work in the meantime
  • Currently unsupported by the SdMmcSpi struct as it solely uses byte-by-byte synchronous send/receive methods
  1. Asynchronous block devices
  • Most disk I/O is inherently asynchronous as the CPU waits for the device
  • In a majority of use cases microcontrollers might not have much else to do
  • In some cases, other, time-critical tasks need to run (e.g. handling wireless transmissions)

My question here is: Would you be interested in integrating support for asynchronous SPI backends?
Follow-up question: If yes, do you have any thoughts on how to do that besides just "implementing everything twice"

I can definitely see both arguments; for integrating it to have a unified place to look for when using SD cards; against stuffing everything into one crate even though it is basically its own thing (sadly, we can't simply pick and choose between async/sync APIs like we can with traits/generics).

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