yangsong8-a1 opened a new pull request, #21641:
URL: https://github.com/apache/nuttx/pull/21641

   ## Summary
   Add SPI_EXCHANGESEQS() and SPI_CANCELSEQS() to the SPI interface and
   spi_transferseqs() to spi_transfer.c, so a caller can hand several SPI
   sequences to the lower half at once, for example to chain them with DMA,
   optionally completing asynchronously through a callback. When a lower
   half does not implement exchangeseqs, spi_transfer() and
   spi_transferseqs() use the existing per-sequence path.
   
   ## Impact
   New optional operations in struct spi_ops_s, under CONFIG_SPI_EXCHANGE.
   Existing lower halves do not set them and keep working as before.
   
   ## Testing
   Ubuntu 22.04, gcc 13.1, sim:nsh with CONFIG_SPI and CONFIG_SPI_EXCHANGE.
   A test program transfers three sequences through a fake SPI device,
   first without and then with an exchangeseqs operation:
   ```
   spi: no exchangeseqs: ret=0 exchange calls=3 rx ok=1
   spi: exchangeseqs: ret=0 seqs passed=3 cookie set=1, exchange calls=3
   spi: spi_transfer() with exchangeseqs: ret=0 seqs passed=4
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to