Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5240

C/C++ • Re: Allocate memory for DMA on Raspberry Pi 5

$
0
0
https://github.com/cleverca22/rp1-kerne ... nel-test.c

an example of such a kernel driver

dma_alloc_noncoherent() is used to allocate some memory from the linux DMA pool
dma_request_chan() and friends are used to control the RP1 dma controller, using the linux DMA subsystem

the only thing thats missing, is some device tree (examples in that repo) that points the DMA block to the PWM instead
then you can come up with your own way of feeding data over
in my example, it shows up as /dev/example and you can just open it and write bytes

Statistics: Posted by cleverca22 — Sat Nov 16, 2024 8:27 am



Viewing all articles
Browse latest Browse all 5240

Trending Articles