Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to use library with different DMA_IRQ #33

Open
negis02 opened this issue Aug 8, 2022 · 1 comment
Open

Add possibility to use library with different DMA_IRQ #33

negis02 opened this issue Aug 8, 2022 · 1 comment

Comments

@negis02
Copy link

negis02 commented Aug 8, 2022

Thanks for grate library.
I hawed a issue to get work this library together with Adafruit_NeoPXL8, because both libraries using same DMA_IRQ.
so i edit DmxInput.cpp file in Pico-DMX:

dma_hw->ints0 = 1u << i;
dma_channel_set_irq0_enabled(_dma_chan, true);
irq_set_exclusive_handler(DMA_IRQ_0, dmxinput_dma_handler);
irq_set_enabled(DMA_IRQ_0, true);

to

dma_hw->ints1 = 1u << i;
dma_channel_set_irq1_enabled(_dma_chan, true);
irq_set_exclusive_handler(DMA_IRQ_1, dmxinput_dma_handler);
irq_set_enabled(DMA_IRQ_1, true);

Now I'm able to control animation patterns of 4000 WS2812 pixels at 35FPS (4 strips 1000LED length) by DMX signal in my project.

@PaintYourDragon
Copy link

This is semi-addressed in NeoPXL8 1.2.3. Partly by changing that code to DMA IRQ 1 (should then play nice with this library), but also by using a shared (rather than exclusive) IRQ handler (should play nice with other libraries if they’re using shared handlers). I’d recommend making a similar change in Pico-DMX for broadest compatibility.

Fairly straightforward, can see this in github.com/adafruit/Adafruit_NeoPXL8
Adafruit_NeoPXL8.cpp around lines 140 and 371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants