From 5631415acddf98b5d72713656a25b73060380677 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:49:18 +0200 Subject: [PATCH] Add ESP32 inverted buzzer support --- tasmota/xdrv_24_buzzer.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_24_buzzer.ino b/tasmota/xdrv_24_buzzer.ino index f158f3cd9..10232cc52 100644 --- a/tasmota/xdrv_24_buzzer.ino +++ b/tasmota/xdrv_24_buzzer.ino @@ -101,9 +101,9 @@ void BuzzerEnabledBeep(uint32_t count, uint32_t duration) bool BuzzerPinState(void) { - if (XdrvMailbox.index == GPIO_BUZZER_INV) { + if (XdrvMailbox.index == AGPIO(GPIO_BUZZER_INV)) { Buzzer.inverted = 1; - XdrvMailbox.index -= (GPIO_BUZZER_INV - GPIO_BUZZER); + XdrvMailbox.index -= (AGPIO(GPIO_BUZZER_INV) - AGPIO(GPIO_BUZZER)); return true; } return false;