NAZE - Make beeper hack Naze specific now that it's clear why the code

existed.
This commit is contained in:
Dominic Clifton 2014-08-01 00:53:22 +01:00
parent 125f6d1450
commit f59c8c3b25
2 changed files with 5 additions and 2 deletions

View File

@ -62,8 +62,6 @@ void ledInit(void)
LED1_OFF;
for (i = 0; i < gpio_count; i++) {
if (hse_value == 12000000 && gpio_setup[i].cfg.mode == Mode_Out_OD)
gpio_setup[i].cfg.mode = Mode_Out_PP;
gpioInit(gpio_setup[i].gpio, &gpio_setup[i].cfg);
}
}

View File

@ -39,8 +39,13 @@ void initBeeperHardware(void)
RCC_APB2PeriphClockCmd(BEEP_PERIPHERAL, ENABLE);
#ifdef NAZE
// Hack - naze rev4 and below used opendrain to PNP for buzzer. Rev5 and above use PP to NPN.
if (hse_value == 12000000 && gpio_setup.cfg.mode == Mode_Out_OD)
gpio_setup.cfg.mode = Mode_Out_PP;
#endif
gpioInit(gpio_setup.gpio, &gpio_setup.cfg);
#endif