Skip to content

Instantly share code, notes, and snippets.

@tanakamasayuki
Created March 14, 2025 06:31
Show Gist options
  • Save tanakamasayuki/0ff4281baebdcd9526046bcb16da9a7a to your computer and use it in GitHub Desktop.
Save tanakamasayuki/0ff4281baebdcd9526046bcb16da9a7a to your computer and use it in GitHub Desktop.
ESP32でbuild_opt.hを利用してライブラリでも読み込めるdefineを追加する
-DUSER_DEFINE=1
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