diff --git a/src/config.cpp b/src/config.cpp index 34605be..94bbfb1 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -6,21 +6,35 @@ //#define PN532_MOSI 23 //#define PN532_SS 5 //#define PN532_MISO 19 -const uint8_t PN532_IRQ = 15; //32 for ESP32 Dev, 15 for ESP32-S3; -const uint8_t PN532_RESET = 16; //33 for ESP32 Dev, 16 for ESP32-S3; +#if CONFIG_IDF_TARGET_ESP32S3 +const uint8_t PN532_IRQ = 15; +const uint8_t PN532_RESET = 16; +#else +const uint8_t PN532_IRQ = 32; +const uint8_t PN532_RESET = 33; +#endif // ***** PN532 // ***** HX711 (Waage) // HX711 circuit wiring -const uint8_t LOADCELL_DOUT_PIN = 19; //16 for ESP32 Dev, 19 for ESP32-S3; -const uint8_t LOADCELL_SCK_PIN = 20; //17 for ESP32 Dev, 20 for ESP32-S3; +#if CONFIG_IDF_TARGET_ESP32S3 +const uint8_t LOADCELL_DOUT_PIN = 19; +const uint8_t LOADCELL_SCK_PIN = 20; +#else +const uint8_t LOADCELL_DOUT_PIN = 16; +const uint8_t LOADCELL_SCK_PIN = 17; +#endif const uint8_t calVal_eepromAdress = 0; const uint16_t SCALE_LEVEL_WEIGHT = 500; // ***** HX711 // ***** TTP223 (Touch Sensor) // TTP223 circuit wiring -const uint8_t TTP223_PIN = 7; //25 for ESP32 Dev, 7 for ESP32-S3; +#if CONFIG_IDF_TARGET_ESP32S3 +const uint8_t TTP223_PIN = 7; +#else +const uint8_t TTP223_PIN = 25; +#endif // ***** TTP223