Implement `async` support for all applicable peripheral drivers
While we have a tracking issue for async drivers with embedded-hal-alpha traits (#70), we should additionally implement async drivers for peripherals which do not have traits pre-defined. We can still provide our own APIs and make these useful.
As we make progress on #70 and I have a better idea of how things are looking, I will update this comment to (eventually) include a task list tracking which drivers need work.
Note There may be additional peripherals missing from the list below which do support asynchronous operation, and conversely there may be peripherals listed below which do not support asynchronous operation. This will get cleaned up over time and this notice will be removed when able.
- [ ]
AES(in progress) - [ ]
ECC - [x]
GPIO - [x]
I2C - [x]
I2S - [ ]
LEDC - [ ]
MCPWM - [x]
PARL_IO - [ ]
PCNT - [x]
RMT - [ ]
RSA(in progress) - [ ]
SDMMC - [ ]
SHA - [x]
SPI - [ ]
TWAI - [x]
UART - [x]
USB(ESP32-S2 & ESP32-S3) - [x]
USB_SERIAL_JTAG - [ ]
ieee802154radio
I'll take a look at usb-serial-jtag as a start!
I'll look into AES
I'll be working on SHA!
I plan a rewrite of the RMT driver including a reasonable level of async support. (Won't be able to start on this too soon - just mentioning it here)
Async support for USB Serial JTAG added in #632
Maybe it would be helpful to go through our existing drivers and figure out which are capable of asynchronous operation, then we can create a task list here to track the progress and hopefully make it easier for people to contribute.
I'm working on RSA
@JurajSadel @SergioGasquez any updates on your progress? If you don't have time to work on these it might be nice to push your current efforts to a branch so somebody else could wrap it up.
I started working on SHA, abandoned it (it was not working) for other stuff, then DMA was refactored in several ways. Today, I started reimplementing my changes from scratch using an updated base branch, here are my changes: https://github.com/esp-rs/esp-hal/compare/main...SergioGasquez:esp-hal:feature/async-sha. It still not working, so I will try to work on it
@jessebraham I have my work here: https://github.com/JurajSadel/esp-hal/tree/feature/async-aes it does something but it's not correct yet.
I will start looking into async I2S next
I'll implement async PARL_IO next
Will take a look into USB for s2 and s3
I'm working on TWAI in #951
Just noting, the list in the original comment needs to be updated to include new peripherals on the ESP32-P4 (but this is pretty low-priority).
I think this issue has probably outlived its usefulness, we can create issues per-driver as needed (some of these exist already).