Skip to content

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