1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +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; static volatile uint32_t sysTickUptime = 0;
// from system_stm32f10x.c // from system_stm32f10x.c
void SetSysClock(bool overclock); void SetSysClock(bool overclock);
// from config.h
bool feature(uint32_t mask);
#ifdef BUZZER #ifdef BUZZER
void systemBeep(bool onoff); void systemBeep(bool onoff);
static void beepRev4(bool onoff); static void beepRev4(bool onoff);
@ -45,7 +43,7 @@ uint32_t millis(void)
return sysTickUptime; return sysTickUptime;
} }
void systemInit(void) void systemInit(bool overclock)
{ {
struct { struct {
GPIO_TypeDef *gpio; GPIO_TypeDef *gpio;
@ -77,7 +75,7 @@ void systemInit(void)
// Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers // Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers
// Configure the Flash Latency cycles and enable prefetch buffer // Configure the Flash Latency cycles and enable prefetch buffer
SetSysClock(feature(FEATURE_OVERCLOCK)); SetSysClock(overclock);
// Turn on clocks for stuff we use // Turn on clocks for stuff we use
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE);

View file

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

View file

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