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 define to disable LEDs #677

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Tomblarom
Copy link

@Tomblarom Tomblarom commented Nov 17, 2023

I added a define to disable the use of LEDs if the hardware misses them. In my case there where none, in order to use all GPIOs as external inputs. I took CAN_ENABLE as example. Obviously by default LED_ENABLE defined as 1 and only set to 0, if HW_HAS_NO_LED is set in the hwconf/hw_xx.h.

And I deleted a duplicate of #include "ledpwm.h" in the main.c file.

@Tomblarom
Copy link
Author

According to @vedderb another solution would be to simply empty out the corresponding variables, like this:

#define LED_GREEN_ON()
#define LED_GREEN_OFF()
#define LED_RED_ON()
#define LED_RED_OFF()

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.

1 participant