casaroli opened a new pull request, #20503:
URL: https://github.com/apache/nuttx/pull/20503

   ## Summary
   
   The rp23xx DMA completion handler calls the callback and then sets 
`dmach->callback` to NULL. A callback that starts the next transfer with 
`rp23xx_dmastart()` registers itself again, and the handler then clears that 
registration. The next transfer completes with no callback, and the channel 
stops with no error.
   
   This change takes the callback and its argument out of the channel and 
clears them before the call. A callback can now start the next transfer from 
inside the callback.
   
   The first commit fixes an older nxstyle error in `rp23xx_dmac.c`, because CI 
checks every file that a change touches. It changes whitespace only.
   
   ## Impact
   
   rp23xx DMA only. The existing users (SPI, I2S, CYW43439, WS2812) do not 
start a transfer from inside the callback; I2S restarts from a work queue. 
Their behaviour does not change.
   
   ## Testing
   
   Pimoroni Pico Plus 2 W, `pimoroni-pico-plus-2-w:nsh`, Arm GNU Toolchain 
13.2.rel1. A local test (not part of this PR) runs a memory-to-memory transfer 
(`RP23XX_DMA_DREQ_FORCE`) whose callback starts the next transfer, up to 100 
times.
   
   Before:
   
   ```
   DMA re-arm test: 1 of 100 completions
   ```
   
   After:
   
   ```
   DMA re-arm test: 100 of 100 completions
   ```
   
   The board boots to NSH with both images. I could not use 
`pimoroni-pico-plus-2-w:wifi` to test the CYW43439 path: that image prints 
nothing on boot on master too.
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   


-- 
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