yincheng.zhong
2019-11-01 fd498f8f31ff9428fa4c042337ac2fba895d4794
源码/核心板/Src/ExternalDevices/beep.c
@@ -7,21 +7,26 @@
   /* Enable GPIO clock */
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
    // Enable GPIO used for beep
    GPIO_InitStructure.GPIO_Pin = BEEP_PIN;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(BEEP_GPIO, &GPIO_InitStructure);
     GPIO_InitStructure.GPIO_Pin = KEY0_PIN;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_Init(KEY0_GPIO, &GPIO_InitStructure);
   
   // Enable GPIO used for beep
    GPIO_InitStructure.GPIO_Pin = BEEP2_PIN;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(BEEP2_GPIO, &GPIO_InitStructure);
   // Enable GPIO used for OUT
    GPIO_InitStructure.GPIO_Pin = OUT2_PIN;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(OUT2_GPIO, &GPIO_InitStructure);
//    // Enable GPIO used for beep
//    GPIO_InitStructure.GPIO_Pin = BEEP_PIN;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
//    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
//    GPIO_Init(BEEP_GPIO, &GPIO_InitStructure);
//
//   // Enable GPIO used for beep
//    GPIO_InitStructure.GPIO_Pin = BEEP2_PIN;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
//    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
//    GPIO_Init(BEEP2_GPIO, &GPIO_InitStructure);
//
//   // Enable GPIO used for OUT
//    GPIO_InitStructure.GPIO_Pin = OUT2_PIN;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
//    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
//    GPIO_Init(OUT2_GPIO, &GPIO_InitStructure);
}