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:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user