analogdevicesinc / no-OS

Software drivers in C for systems without an operating system
http://analogdevicesinc.github.io/no-OS/
Other
882 stars 1.63k forks source link

Fix spi engine offload #2240

Closed ahaslam2 closed 2 weeks ago

ahaslam2 commented 2 weeks ago

Fix spi engine offload

The bytes that are transfered on dma per sample depend on the DMA_DATA_WIDTH_SRC of the dma IP not on the data_width bytes sent by the spi_engine on the spi bus.

PR Type

PR Checklist

ahaslam2 commented 2 weeks ago

Somebody with good insight of the axi_dma can confirm this is correct? i will have to go and see other users of offload_xfer if these changes make sense.

dbogdan commented 2 weeks ago

I think the change makes sense.

ahaslam2 commented 2 weeks ago

@dbogdan i need to check other parts using spi_engine_offload_transfer..

also, just realized that rx_transfer is using a "4" instead of dma size. will fix