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

Question: Disable single channel #15

Open
knathan1987 opened this issue Feb 18, 2023 · 1 comment
Open

Question: Disable single channel #15

knathan1987 opened this issue Feb 18, 2023 · 1 comment

Comments

@knathan1987
Copy link

Hi!

How can I disable a single channel?
Sure - I could set the whole channel to black.
But I want the data Pin for that channel to either be high or low for as long the channels is disabled - without any state changes.
I would start by adding an "enabled" option to the "WS2812_BufferItem"-Structure. But I don't know where I should continue - and I don't really understand that whole DMA thing 😅😞

@hubmartin
Copy link
Owner

You can disable bits in this RAM array at runtime. Each bit corresponds to GPIO port 0 to 15.
https://github.com/hubmartin/WS2812B_STM32F4/blob/master/Src/ws2812b/ws2812b.c#L23

If the bit is cleared, then the DMA on the begining in the cycle does not write to the bit set register.

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