Skip to content

spi-overhaul: add limitation for spi async API #8966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/design-documents/hal/0000-spi-overhaul.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ void spi_free(spi_t *obj);
- In Half-duplex mode :
- as master, `spi_transfer()` sends `tx_len` symbols and then reads `rx_len` symbols.
- as slave, `spi_transfer()` receives `rx_len` symbols and then sends `tx_len` symbols.
- `spi_transter_async()` schedules a transfer to be process the same way `spi_transfer()` would have but asynchronously.
- `spi_transter_async()` schedules a transfer to be process the same way `spi_transfer()` would have but asynchronously with the following exceptions:
- in async mode only transfers of the same size are allowed (tx size must be equal to rx size)
- async mode only supports full-duplex mode
- `spi_transter_async()` returns immediately with a boolean indicating whether the transfer was successfully scheduled or not.
- The callback given to `spi_transfer_async()` is invoked when the transfer completes (with a success or an error).
- `spi_transfer_async()` saves the handler and the `ctx` pointer.
Expand Down