-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Added #define LED_BUILTIN
to all pins_arduino.h that need it.
#4518
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
Conversation
#define BUILTIN_LED2 LED_BUILTINB | ||
#define LED_BUILTIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTINB
?
how does a define and a const char coexist? static const uint8_t LED_BUILTIN = 4;
#define LED_BUILTIN |
@@ -13,6 +13,7 @@ | |||
|
|||
static const uint8_t LED_BUILTIN = -1; | |||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |||
#define LED_BUILTIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and other cases should be #define LED_BUILTIN LED_BUILTIN
The |
this works: static const uint8_t LED_BUILTIN = 4;
#define LED_BUILTIN LED_BUILTIN
int main(){
#ifdef LED_BUILTIN
printf("LED_BUILTIN: %u\n", LED_BUILTIN);
#endif
return 0;
}
|
Yes, but this won't:
The ifdef block will be excluded from compilation. |
yes yes :) i got the problem. PR needs fixing :) likle find and replace 😄 |
This PR hasn't been merged yet and is still pending here for fixes. |
No good deed goes unpunished. |
Fixes #4134