stm32f7: rcc: intial stubs support

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
(Added defines and used them)
This commit is contained in:
Sync
2015-10-22 13:29:43 +02:00
committed by Karl Palsson
parent 7ee1d948e9
commit 3fc0c9d001
3 changed files with 15 additions and 1 deletions

View File

@@ -40,7 +40,9 @@ TGT_CFLAGS = -Os -g \
ARFLAGS = rcs
OBJS = gpio.o gpio_common_all.o gpio_common_f0234.o
OBJS = rcc.o gpio.o gpio_common_all.o gpio_common_f0234.o
OBJS += rcc_common_all.o
OBJS += rng_common_v1.o

11
lib/stm32/f7/rcc.c Normal file
View File

@@ -0,0 +1,11 @@
#include <libopencm3/stm32/rcc.h>
uint32_t rcc_ahb_frequency = 16000000;
uint32_t rcc_apb1_frequency = 16000000;
uint32_t rcc_apb2_frequency = 16000000;
uint32_t rcc_system_clock_source(void)
{
/* Return the clock source which is used as system clock. */
return (RCC_CFGR >> RCC_CFGR_SWS_SHIFT) & RCC_CFGR_SWS_MASK;
}