Skip to content

Commit

Permalink
Change from ifndef to ifdef
Browse files Browse the repository at this point in the history
Per review feedback.
  • Loading branch information
crankyoldgit committed Mar 5, 2022
1 parent e2d8ebd commit ca226a5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions examples/DumbIRRepeater/DumbIRRepeater.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
// The GPIO an IR detector/demodulator is connected to. Recommended: 14 (D5)
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
// Note: GPIO 14 won't work on the ESP32-C3 as it causes the board to reboot.
#ifndef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#else // ARDUINO_ESP32C3_DEV
#ifdef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 10; // 14 on a ESP32-C3 causes a boot loop.
#else // ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#endif // ARDUINO_ESP32C3_DEV

// GPIO to use to control the IR LED circuit. Recommended: 4 (D2).
Expand Down
6 changes: 3 additions & 3 deletions examples/IRrecvDemo/IRrecvDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
// board).
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
// Note: GPIO 14 won't work on the ESP32-C3 as it causes the board to reboot.
#ifndef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#else // ARDUINO_ESP32C3_DEV
#ifdef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 10; // 14 on a ESP32-C3 causes a boot loop.
#else // ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#endif // ARDUINO_ESP32C3_DEV

IRrecv irrecv(kRecvPin);
Expand Down
6 changes: 3 additions & 3 deletions examples/IRrecvDumpV2/IRrecvDumpV2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
// e.g. D5 on a NodeMCU board.
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
// Note: GPIO 14 won't work on the ESP32-C3 as it causes the board to reboot.
#ifndef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#else // ARDUINO_ESP32C3_DEV
#ifdef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 10; // 14 on a ESP32-C3 causes a boot loop.
#else // ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#endif // ARDUINO_ESP32C3_DEV

// The Serial connection baud rate.
Expand Down
6 changes: 3 additions & 3 deletions examples/IRrecvDumpV3/IRrecvDumpV3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
// e.g. D5 on a NodeMCU board.
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
// Note: GPIO 14 won't work on the ESP32-C3 as it causes the board to reboot.
#ifndef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#else // ARDUINO_ESP32C3_DEV
#ifdef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 10; // 14 on a ESP32-C3 causes a boot loop.
#else // ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#endif // ARDUINO_ESP32C3_DEV

// The Serial connection baud rate.
Expand Down
6 changes: 3 additions & 3 deletions examples/SmartIRRepeater/SmartIRRepeater.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
// The GPIO an IR detector/demodulator is connected to. Recommended: 14 (D5)
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
// Note: GPIO 14 won't work on the ESP32-C3 as it causes the board to reboot.
#ifndef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#else // ARDUINO_ESP32C3_DEV
#ifdef ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 10; // 14 on a ESP32-C3 causes a boot loop.
#else // ARDUINO_ESP32C3_DEV
const uint16_t kRecvPin = 14;
#endif // ARDUINO_ESP32C3_DEV

// GPIO to use to control the IR LED circuit. Recommended: 4 (D2).
Expand Down

0 comments on commit ca226a5

Please sign in to comment.