GPIOA.c 667 B

123456789101112131415161718192021222324252627
  1. #include "stm32f10x.h" // Device header
  2. #include "CONFIG.h"
  3. #include "AT.h"
  4. void GPIOA_Init(void)
  5. {
  6. RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE);
  7. GPIO_InitTypeDef GPIO_InitStructure;
  8. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  9. GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
  10. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  11. GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
  12. // //GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 4gÀ­¸ß
  13. #if NBFLAG
  14. GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // nbÀ­µÍ
  15. #endif
  16. #if _4GFLAG
  17. GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin); // 4gÀ­¸ß
  18. #endif
  19. // GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // nbÀ­µÍ
  20. }