RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC | RCC_APB2Periph_AFIO, ENABLE);//开C口时钟,复用时钟。
GPIO_InitTypeDef GPIO_InitStructure;//设为输出 注意:2MHZ
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12|GPIO_Pin_13 |GPIO_Pin_14 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);
PWR_BackupAccessCmd(ENABLE);//允许修改RTC 和后备寄存器
RCC_LSEConfig(RCC_LSE_OFF);//关闭外部低速外部时钟信号功能 后,PC13 PC14 PC15 才可以当普通IO用。
// BKP_TamperPinCmd(DISABLE);//关闭入侵检测功能,也就是 PC13,也可以当普通IO 使用
// BKP_ITConfig(DISABLE); 这样就可以当输出用啦。