rcc.c 337 B

123456789101112131415161718
  1. void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  2. {
  3. /* Check the parameters */
  4. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  5. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6. if (NewState != DISABLE)
  7. {
  8. RCC->APB2ENR |= RCC_APB2Periph;
  9. }
  10. else
  11. {
  12. RCC->APB2ENR &= ~RCC_APB2Periph;
  13. }
  14. }