| 226 | } |
| 227 | |
| 228 | void switchSystemClock(const SystemClockSource source) |
| 229 | { |
| 230 | const auto sourceValue = static_cast<uint32_t>(source); |
| 231 | RCC->CFGR = (RCC->CFGR & ~RCC_CFGR_SW) | sourceValue << RCC_CFGR_SW_Pos; |
| 232 | while ((RCC->CFGR & RCC_CFGR_SWS) != sourceValue << RCC_CFGR_SWS_Pos); |
| 233 | } |
| 234 | |
| 235 | } // namespace chip |
| 236 |
no outgoing calls
no test coverage detected