GPIOA.c 795 B

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