Migrate SPI controller operations to async - #3161
Conversation
8c5ba0f to
ff823a4
Compare
f84c4ae to
36a90c4
Compare
36a90c4 to
0dc5c19
Compare
6e9364e to
5ab5adf
Compare
5ab5adf to
e9039a2
Compare
e9039a2 to
c4fddc6
Compare
c4fddc6 to
81ce542
Compare
81ce542 to
63cc407
Compare
|
@CodeRabbit review |
|
WalkthroughThe SPI transfer implementation now separates transaction start and completion. ESP32 transfers use queued transactions, event-driven completion, managed buffers, and non-blocking bus acquisition. The Toit API serializes transfers and closes devices under a mutex. ChangesSPI transfer flow
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The asynchronous SPI transfer and bus-reservation changes can leave a reservation unreleased if the device closes while a task is yielding, and certain completion errors may strand an in-flight transaction and its buffers. The associated interrupt configuration and required ESP-IDF change also need explicit validation, so this is not merge-ready until the lifecycle and error paths are addressed. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 4 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
63cc407 to
b813676
Compare
b813676 to
a3cd396
Compare
a3cd396 to
59a5ab5
Compare
aac57ae to
b010aac
Compare
b010aac to
f115e1f
Compare
f115e1f to
e46fe11
Compare
5482b71 to
ff93ff9
Compare
ff93ff9 to
a19c46a
Compare
eeeb310 to
9552d02
Compare
Stacked on #3160. The required ESP-IDF patch head is already on master.
This migrates ESP32 SPI controller transfers and explicit bus reservation away from blocking primitives.
Highlights:
The ESP-IDF patch head on master includes the narrow public nonblocking bus-acquire operation and the later I2C/SPI hardening. A recent upstream ESP-IDF checkout still has no public finite-time or nonblocking SPI bus acquisition, so the private-fork addition remains necessary and follows the existing ESP-IDF lock API.
This is a complete-transaction API. Half-buffer streaming and watermark callbacks are deliberately not included.