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 support for using a ws2812 led for DAP_STATUS #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

badbunnyyy
Copy link

Hi Alex,

thank you for your free-dap project. I use it with a RP2040-Zero, which has a ws2812 RGB led on pin 16 rather than the standard led on pin 25 (https://www.waveshare.com/wiki/RP2040-Zero).

I added support for blinking the ws2812 led. Would you be interested in adding this to your project?
As far as I can tell it works and doesn't break anything.

There is a new option DAP_STATUS_USE_WS2812 to enable blinking both the standard led and the rgb led, so it should work on both standard and zero boards. If you disable this option, everything should be as before with just the standard led on pin 25 blinking.

A few notes:

  • generated/ws2812.pio.h is autogenerated by pioasm.
  • hardware/pio.h is only a dummy to compile ws2812.pio.h, as the code generated by pioasm includes references to it and I think there is no way to switch that off.
  • ws2812_pio.h has defines for setting the color
  • the pin for the ws2812 led is currently hardcoded in ws2812_pio.c. This could be changed if you see potential in it.
  • The first two changes in Makefile are just to make it compile on my local computer, obviously. But I didn't know how to keep them out of this commit.

Kind regards,
Stefan

@ataradov
Copy link
Owner

ataradov commented May 1, 2024

The goal of this project is to provide a base for the CMSIS-DAP firmware. The actual projects are just minimal examples of how to use it. I don't want to add complicated things and support for all possible hardware here. This is something individual implementations should do on their own.

@badbunnyyy
Copy link
Author

Thanks for the info. I can see your point. If there should ever be a list /collection of "unsupported user contributions" or something similar, feel free to link to or use my material.

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

Successfully merging this pull request may close these issues.

2 participants