1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

removed feature from driver

This commit is contained in:
Johannes Kasberger 2014-04-15 09:19:19 +02:00
parent 6716ecfe7e
commit 5377b39f36
3 changed files with 4 additions and 6 deletions

View file

@ -6,8 +6,6 @@ static volatile uint32_t usTicks = 0;
static volatile uint32_t sysTickUptime = 0;
// from system_stm32f10x.c
void SetSysClock(bool overclock);
// from config.h
bool feature(uint32_t mask);
#ifdef BUZZER
void systemBeep(bool onoff);
static void beepRev4(bool onoff);
@ -45,7 +43,7 @@ uint32_t millis(void)
return sysTickUptime;
}
void systemInit(void)
void systemInit(bool overclock)
{
struct {
GPIO_TypeDef *gpio;
@ -77,7 +75,7 @@ void systemInit(void)
// Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers
// Configure the Flash Latency cycles and enable prefetch buffer
SetSysClock(feature(FEATURE_OVERCLOCK));
SetSysClock(overclock);
// Turn on clocks for stuff we use
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE);

View file

@ -1,6 +1,6 @@
#pragma once
void systemInit(void);
void systemInit(bool overclock);
void delayMicroseconds(uint32_t us);
void delay(uint32_t ms);

View file

@ -38,7 +38,7 @@ int main(void)
#endif
checkFirstTime(false);
readEEPROM();
systemInit();
systemInit(feature(FEATURE_OVERCLOCK));
#ifdef USE_LAME_PRINTF
init_printf(NULL, _putc);
#endif