#include "stm32f10x.h" // Device header #include "CONFIG.h" #include "AT.h" void GPIOA_Init(void) { RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE); GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(WAKE_GPIO, &GPIO_InitStructure); // //GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 4g拉高 #if NBFLAG GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // nb拉低 #else GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 4g拉高 #endif // GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // nb拉低 }