Browse Source
Reviewed-by: Karl Palsson <karlp@tweak.net.au> (Added defines and used them)pull/758/head
Sync
9 years ago
committed by
Karl Palsson
3 changed files with 15 additions and 1 deletions
@ -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; |
||||
|
} |
Loading…
Reference in new issue