stm32: common: Extract MCO source setting

This adds MCO source selection to some targets, and removes and standardizes
the mask/shift usage for all targets.  For devices that support MCO2, this
supports only MCO1.  No attempt has been made to extract MCO prescaler, which
is not available on all F1 and F3.
This commit is contained in:
Karl Palsson
2015-01-12 05:44:41 +01:00
parent 7ba1b57481
commit 5746fd4d25
11 changed files with 41 additions and 27 deletions

View File

@@ -594,13 +594,6 @@ void rcc_set_prediv1_source(uint32_t rccsrc)
RCC_CFGR2 &= ~RCC_CFGR2_PREDIV1SRC;
}
void rcc_set_mco(uint32_t mcosrc)
{
RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_MCO) |
(mcosrc << RCC_CFGR_MCO_SHIFT);
}
/*---------------------------------------------------------------------------*/
/** @brief RCC Get the System Clock Source.