From 025a38a1f743fd9e89cbd477abe3f79a8d098097 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 19 Nov 2011 17:21:31 +0100 Subject: Moved os and hal related files into subdirectories. --- rcc.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 rcc.cpp (limited to 'rcc.cpp') diff --git a/rcc.cpp b/rcc.cpp deleted file mode 100644 index e3ae38d..0000000 --- a/rcc.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "rcc.h" -#include "stm32.h" - -void rcc_init() { - // Set flash latency. - FLASH.ACR = 0x12; - - // Enable HSE. - RCC.CR |= 0x10000; - while(RCC.CR & 0x20000); - - // Configure and enable PLL. - RCC.CFGR = 0x1d0000; - RCC.CR |= 0x1000000; - while(RCC.CR & 0x2000000); - - // Switch to PLL. - RCC.CFGR |= 0x2; - while(!(RCC.CFGR & 0x8)); - - // Set APB1 prescaler to /2. - RCC.CFGR |= 0x400; - - // Set ADCCLK prescaler to /6. - RCC.CFGR |= 0x8000; -} -- cgit v1.2.3