GPIOA.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. 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. #endif
  14. #if BC260Y
  15. RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE);
  16. GPIO_InitTypeDef GPIO_InitStructure;
  17. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  18. GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
  19. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  20. GPIO_Init(GPIOA, &GPIO_InitStructure);
  21. GPIO_ResetBits(GPIOA, GPIO_Pin_7); // nb윗됴
  22. #endif
  23. #if ESP32
  24. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  25. GPIO_InitTypeDef GPIO_InitStructure;
  26. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  27. GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
  28. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  29. GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
  30. GPIO_ResetBits(WAKE_GPIO, WAKE_GPIO_Pin); // WiFi�金추多신윗됴
  31. #endif
  32. #if AIWB2
  33. RCC_APB2PeriphClockCmd(WAKE_GPIO_RCC, ENABLE);
  34. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
  35. GPIO_InitTypeDef GPIO_InitStructure;
  36. GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  37. GPIO_InitStructure.GPIO_Pin = WAKE_GPIO_Pin;
  38. GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  39. GPIO_Init(WAKE_GPIO, &GPIO_InitStructure);
  40. GPIO_ResetBits(GPIOA, GPIO_Pin_6); //WIFI_AIWB2-32S윗됴
  41. #endif
  42. }