| 232 | #endif // defined(DISTORTOS_CHIP_STM32F105) || defined(DISTORTOS_CHIP_STM32F107) |
| 233 | |
| 234 | void switchSystemClock(const SystemClockSource source) |
| 235 | { |
| 236 | const auto sourceValue = static_cast<uint32_t>(source); |
| 237 | RCC->CFGR = (RCC->CFGR & ~RCC_CFGR_SW) | sourceValue << RCC_CFGR_SW_Pos; |
| 238 | while ((RCC->CFGR & RCC_CFGR_SWS) != sourceValue << RCC_CFGR_SWS_Pos); |
| 239 | } |
| 240 | |
| 241 | } // namespace chip |
| 242 |
no outgoing calls
no test coverage detected