启动蜂鸣器 ,风扇,马达
RCC |= (0x3<<4);
//蜂鸣器
GPIOB->MODER &= (~(0x3 <<12));
GPIOB->MODER |= (0x1 <<12);
// GPIOB->OTYPER &= (~(0x1 <<6));
// GPIOB->OSPEEDR &= (~(0x3 <<12));
// GPIOB->PUPDR &= (~(0x3 <<12));
GPIOB->ODR |=(0x1 <<6);
delay(200);
GPIOB->ODR &=(~(0x1 <<6));
//风扇
GPIOE->MODER &= (~(0x3 <<18));
GPIOE->MODER |= (0x1 <<18);
GPIOE->ODR |=(0x1 <<9);
delay(1000);
GPIOE->ODR &=(~(0x1 <<9));
//马达
GPIOF->MODER &= (~(0x3 <<12));
GPIOF->MODER |= (0x1 <<12);
while(1)
{
GPIOF->ODR |=(0x1 <<6);
}