Skip to content

Commit eb59056

Browse files
author
Cruz Monrreal
authored
Merge pull request #8966 from mprse/feature-hal-spec-spi_doc_fix_async
spi-overhaul: add limitation for spi async API
2 parents 0892667 + 7eb7df9 commit eb59056

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/design-documents/hal/0000-spi-overhaul.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ void spi_free(spi_t *obj);
196196
- In Half-duplex mode :
197197
- as master, `spi_transfer()` sends `tx_len` symbols and then reads `rx_len` symbols.
198198
- as slave, `spi_transfer()` receives `rx_len` symbols and then sends `tx_len` symbols.
199-
- `spi_transter_async()` schedules a transfer to be process the same way `spi_transfer()` would have but asynchronously.
199+
- `spi_transter_async()` schedules a transfer to be process the same way `spi_transfer()` would have but asynchronously with the following exceptions:
200+
- in async mode only transfers of the same size are allowed (tx size must be equal to rx size)
201+
- async mode only supports full-duplex mode
200202
- `spi_transter_async()` returns immediately with a boolean indicating whether the transfer was successfully scheduled or not.
201203
- The callback given to `spi_transfer_async()` is invoked when the transfer completes (with a success or an error).
202204
- `spi_transfer_async()` saves the handler and the `ctx` pointer.

0 commit comments

Comments
 (0)