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

Merge remote-tracking branch 'multiwii/master'

Conflicts:
	obj/baseflight.hex
	src/config.c
	src/drivers/system_common.c
	src/main.c
	src/mw.h
	src/serial_cli.c
This commit is contained in:
Dominic Clifton 2014-04-21 12:29:19 +01:00
commit a3d2a3df2d
8 changed files with 32 additions and 15 deletions

View file

@ -18,7 +18,7 @@ static volatile uint32_t usTicks = 0;
// current uptime for 1kHz systick timer. will rollover after 49 days. hopefully we won't care.
static volatile uint32_t sysTickUptime = 0;
// from system_stm32f10x.c
void SetSysClock(void);
void SetSysClock(bool overclock);
static void cycleCounterInit(void)
{
@ -50,7 +50,7 @@ uint32_t millis(void)
return sysTickUptime;
}
void systemInit(void)
void systemInit(bool overclock)
{
struct {
GPIO_TypeDef *gpio;
@ -82,7 +82,7 @@ void systemInit(void)
// Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers
// Configure the Flash Latency cycles and enable prefetch buffer
SetSysClock();
SetSysClock(overclock);
// Turn on clocks for stuff we use
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE);