Created
March 14, 2025 06:31
-
-
Save tanakamasayuki/0ff4281baebdcd9526046bcb16da9a7a to your computer and use it in GitHub Desktop.
ESP32でbuild_opt.hを利用してライブラリでも読み込めるdefineを追加する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-DUSER_DEFINE=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(115200); | |
} | |
void loop() { | |
#ifdef USER_DEFINE | |
Serial.printf("USER_DEFINE is %d\n", USER_DEFINE); | |
#else | |
Serial.printf("USER_DEFINE -\n"); | |
#endif | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment