diff --git a/src/main/drivers/sound_beeper.c b/src/main/drivers/sound_beeper.c index dbe3122bd..bbeec07eb 100644 --- a/src/main/drivers/sound_beeper.c +++ b/src/main/drivers/sound_beeper.c @@ -59,7 +59,7 @@ void beeperInit(const beeperConfig_t *config) if (beeperIO) { IOInit(beeperIO, OWNER_BEEPER, 0); - IOConfigGPIO(beeperIO, config->isOD ? IOCFG_OUT_OD : IOCFG_OUT_PP); + IOConfigGPIO(beeperIO, config->isOpenDrain ? IOCFG_OUT_OD : IOCFG_OUT_PP); } systemBeep(false); #endif diff --git a/src/main/drivers/sound_beeper.h b/src/main/drivers/sound_beeper.h index 455edd7c2..5c6b8329b 100644 --- a/src/main/drivers/sound_beeper.h +++ b/src/main/drivers/sound_beeper.h @@ -32,7 +32,7 @@ typedef struct beeperConfig_s { ioTag_t ioTag; uint8_t isInverted; - uint8_t isOD; + uint8_t isOpenDrain; } beeperConfig_t; void systemBeep(bool on); diff --git a/src/main/fc/config.c b/src/main/fc/config.c index ac6a573ad..93c883210 100755 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -352,10 +352,10 @@ void resetAdcConfig(adcConfig_t *adcConfig) void resetBeeperConfig(beeperConfig_t *beeperConfig) { #ifdef BEEPER_INVERTED - beeperConfig->isOD = false; + beeperConfig->isOpenDrain = false; beeperConfig->isInverted = true; #else - beeperConfig->isOD = true; + beeperConfig->isOpenDrain = true; beeperConfig->isInverted = false; #endif beeperConfig->ioTag = IO_TAG(BEEPER); diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 1515e3c28..afc9b2177 100755 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -754,8 +754,8 @@ const clivalue_t valueTable[] = { #endif #ifdef BEEPER - { "beeper_inverted", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.beeperConfig.isInverted, .config.lookup = { TABLE_OFF_ON } }, - { "beeper_od", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.beeperConfig.isOD, .config.lookup = { TABLE_OFF_ON } }, + { "beeper_inversion", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.beeperConfig.isInverted, .config.lookup = { TABLE_OFF_ON } }, + { "beeper_od", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.beeperConfig.isOpenDrain, .config.lookup = { TABLE_OFF_ON } }, #endif #ifdef SERIAL_RX diff --git a/src/main/target/NAZE/config.c b/src/main/target/NAZE/config.c index 5531fb0b8..d2fbce409 100755 --- a/src/main/target/NAZE/config.c +++ b/src/main/target/NAZE/config.c @@ -82,8 +82,11 @@ void targetConfiguration(master_t *config) if (hardwareRevision >= NAZE32_REV5) { // naze rev4 and below used opendrain to PNP for buzzer. Rev5 and above use PP to NPN. - config->beeperConfig.isOD = false; + config->beeperConfig.isOpenDrain = false; config->beeperConfig.isInverted = true; + } else { + config->beeperConfig.isOpenDrain = true; + config->beeperConfig.isInverted = false; } }