NAZE - Make beeper hack Naze specific now that it's clear why the code
existed.
This commit is contained in:
parent
125f6d1450
commit
f59c8c3b25
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue