From d00b51271d65c135246b2ec4ca6e4d895542d01f Mon Sep 17 00:00:00 2001 From: Torsten Stauder Date: Sat, 13 Nov 2021 15:45:35 +0100 Subject: [PATCH] Config-updates --- src/settings-azdelivery_sdmmc.h | 8 +++++++- src/settings-complete.h | 15 ++++++++++----- src/settings-lolin_d32_pro_sdmmc_pe.h | 8 +++++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/settings-azdelivery_sdmmc.h b/src/settings-azdelivery_sdmmc.h index 099c780..3367745 100644 --- a/src/settings-azdelivery_sdmmc.h +++ b/src/settings-azdelivery_sdmmc.h @@ -25,7 +25,13 @@ // (SCK) 14 SCK // (MISO) 2 D0 #else - // uSD-card-reader (via SPI) is not supported by this board! + // SPI-SD IS NOT SUPPORTED BY THIS PCB - DON'T USE INTERNAL SD-READER! + #define SPISD_CS 99 // GPIO for chip select (SD) + #ifndef SINGLE_SPI_ENABLE + #define SPISD_MOSI 99 // GPIO for master out slave in (SD) => not necessary for single-SPI + #define SPISD_MISO 99 // GPIO for master in slave ou (SD) => not necessary for single-SPI + #define SPISD_SCK 99 // GPIO for clock-signal (SD) => not necessary for single-SPI + #endif #endif // RFID (via SPI) diff --git a/src/settings-complete.h b/src/settings-complete.h index 381c7a9..97515dc 100644 --- a/src/settings-complete.h +++ b/src/settings-complete.h @@ -17,8 +17,13 @@ // (SCK) 14 SCK // (MISO) 2 D0 #else - // uSD-card-reader (via SPI) - // Not supported + // SPI-SD IS NOT SUPPORTED BY THIS PCB - DON'T USE INTERNAL SD-READER! + #define SPISD_CS 99 // GPIO for chip select (SD) + #ifndef SINGLE_SPI_ENABLE + #define SPISD_MOSI 99 // GPIO for master out slave in (SD) => not necessary for single-SPI + #define SPISD_MISO 99 // GPIO for master in slave ou (SD) => not necessary for single-SPI + #define SPISD_SCK 99 // GPIO for clock-signal (SD) => not necessary for single-SPI + #endif #endif // RFID (via SPI) @@ -88,14 +93,14 @@ // (optional) Monitoring of battery-voltage via ADC #ifdef MEASURE_BATTERY_VOLTAGE #define VOLTAGE_READ_PIN 39 // GPIO used to monitor battery-voltage. - constexpr float referenceVoltage = 3.3; // Voltage between 3.3V and GND-pin in battery-mode (disconnect USB!) - constexpr float offsetVoltage = 0.0; // If voltage measured by ESP isn't 100% accurate, you can add an correction-value here + constexpr float referenceVoltage = 3.3; // Reference-voltage + constexpr float offsetVoltage = 0.55; // If voltage measured by ESP isn't 100% accurate, you can add a correction-value here #endif // (optional) For measuring battery-voltage a voltage-divider is necessary. Their values need to be configured here. #ifdef MEASURE_BATTERY_VOLTAGE constexpr uint16_t rdiv1 = 100; // Rdiv1 of voltage-divider (kOhms) - constexpr uint16_t rdiv2 = 100; // Rdiv2 of voltage-divider (kOhms) => used to measure voltage via ADC! + constexpr uint16_t rdiv2 = 33; // Rdiv2 of voltage-divider (kOhms) => used to measure voltage via ADC! #endif // (Optional) remote control via infrared diff --git a/src/settings-lolin_d32_pro_sdmmc_pe.h b/src/settings-lolin_d32_pro_sdmmc_pe.h index ad95674..61d63a2 100644 --- a/src/settings-lolin_d32_pro_sdmmc_pe.h +++ b/src/settings-lolin_d32_pro_sdmmc_pe.h @@ -26,6 +26,12 @@ // (MISO) 2 D0 #else // SPI-SD IS NOT SUPPORTED BY THIS PCB - DON'T USE INTERNAL SD-READER! + #define SPISD_CS 99 // GPIO for chip select (SD) + #ifndef SINGLE_SPI_ENABLE + #define SPISD_MOSI 99 // GPIO for master out slave in (SD) => not necessary for single-SPI + #define SPISD_MISO 99 // GPIO for master in slave ou (SD) => not necessary for single-SPI + #define SPISD_SCK 99 // GPIO for clock-signal (SD) => not necessary for single-SPI + #endif #endif // RFID (via SPI) @@ -38,7 +44,7 @@ #ifdef RFID_READER_TYPE_PN5180 #define RFID_BUSY 33 // PN5180 BUSY PIN #define RFID_RST 22 // PN5180 RESET PIN - #define RFID_IRQ 106 // PN5180 IRQ PIN (only used for low power card detection (LPCD)) + #define RFID_IRQ 99 // Needs to be adjusted to 106 if LPCD-mode is desired! #endif // I2S (DAC)