mirror of https://github.com/arendst/Tasmota.git
Add ESP32 inverted buzzer support
This commit is contained in:
parent
f4adce5fb1
commit
5631415acd
|
@ -101,9 +101,9 @@ void BuzzerEnabledBeep(uint32_t count, uint32_t duration)
|
||||||
|
|
||||||
bool BuzzerPinState(void)
|
bool BuzzerPinState(void)
|
||||||
{
|
{
|
||||||
if (XdrvMailbox.index == GPIO_BUZZER_INV) {
|
if (XdrvMailbox.index == AGPIO(GPIO_BUZZER_INV)) {
|
||||||
Buzzer.inverted = 1;
|
Buzzer.inverted = 1;
|
||||||
XdrvMailbox.index -= (GPIO_BUZZER_INV - GPIO_BUZZER);
|
XdrvMailbox.index -= (AGPIO(GPIO_BUZZER_INV) - AGPIO(GPIO_BUZZER));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue