mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-15 09:32:08 +00:00
PMU IRQ polarity was backwards
This commit is contained in:
parent
3df81682b3
commit
598023f5db
@ -43,8 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// Select which board is being used. If the outside build environment has sent a choice, just use that
|
// Select which board is being used. If the outside build environment has sent a choice, just use that
|
||||||
#if !defined(T_BEAM_V10) && !defined(HELTEC_LORA32)
|
#if !defined(T_BEAM_V10) && !defined(HELTEC_LORA32)
|
||||||
//#define T_BEAM_V10 // AKA Rev1 (second board released)
|
#define T_BEAM_V10 // AKA Rev1 (second board released)
|
||||||
#define HELTEC_LORA32
|
//#define HELTEC_LORA32
|
||||||
|
|
||||||
#define HW_VERSION_US // We encode the hardware freq range in the hw version string, so sw update can eventually install the correct build
|
#define HW_VERSION_US // We encode the hardware freq range in the hw version string, so sw update can eventually install the correct build
|
||||||
#endif
|
#endif
|
||||||
|
@ -223,7 +223,7 @@ void doLightSleep(uint32_t sleepMsec = 20 * 1000) // FIXME, use a more reasonabl
|
|||||||
gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); // when user presses, this button goes low
|
gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); // when user presses, this button goes low
|
||||||
gpio_wakeup_enable((gpio_num_t)DIO0_GPIO, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
gpio_wakeup_enable((gpio_num_t)DIO0_GPIO, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
||||||
#ifdef PMU_IRQ
|
#ifdef PMU_IRQ
|
||||||
gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_LOW_LEVEL); // pmu irq
|
gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_HIGH_LEVEL); // pmu irq
|
||||||
#endif
|
#endif
|
||||||
esp_sleep_enable_gpio_wakeup();
|
esp_sleep_enable_gpio_wakeup();
|
||||||
esp_sleep_enable_timer_wakeup(sleepUsec);
|
esp_sleep_enable_timer_wakeup(sleepUsec);
|
||||||
@ -378,7 +378,7 @@ void axp192Init()
|
|||||||
attachInterrupt(PMU_IRQ, [] {
|
attachInterrupt(PMU_IRQ, [] {
|
||||||
pmu_irq = true;
|
pmu_irq = true;
|
||||||
},
|
},
|
||||||
FALLING);
|
RISING);
|
||||||
|
|
||||||
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
|
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
|
||||||
axp.enableIRQ(AXP202_VBUS_REMOVED_IRQ | AXP202_VBUS_CONNECT_IRQ | AXP202_BATT_REMOVED_IRQ | AXP202_BATT_CONNECT_IRQ, 1);
|
axp.enableIRQ(AXP202_VBUS_REMOVED_IRQ | AXP202_VBUS_CONNECT_IRQ | AXP202_BATT_REMOVED_IRQ | AXP202_BATT_CONNECT_IRQ, 1);
|
||||||
@ -550,6 +550,8 @@ void loop()
|
|||||||
pmu_irq = false;
|
pmu_irq = false;
|
||||||
axp.readIRQ();
|
axp.readIRQ();
|
||||||
|
|
||||||
|
DEBUG_MSG("pmu irq!\n");
|
||||||
|
|
||||||
isCharging = axp.isChargeing();
|
isCharging = axp.isChargeing();
|
||||||
isUSBPowered = axp.isVBUSPlug();
|
isUSBPowered = axp.isVBUSPlug();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user