ql_pin_cfg.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /** @file
  2. ql_pin_cfg.h
  3. @brief
  4. This file provides the definitions for ql pin cfg, and declares the API functions.
  5. */
  6. /*================================================================
  7. Copyright (c) 2020 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
  8. Quectel Wireless Solution Proprietary and Confidential.
  9. =================================================================*/
  10. /*=================================================================
  11. EDIT HISTORY FOR MODULE
  12. This section contains comments describing changes made to the module.
  13. Notice that changes are listed in reverse chronological order.
  14. WHEN WHO WHAT, WHERE, WHY
  15. ------------ ------- -------------------------------------------------------------------------------
  16. 15/03/2021 Neo Init version
  17. =================================================================*/
  18. #ifndef QL_PIN_CFG_H
  19. #define QL_PIN_CFG_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #include <stdio.h>
  24. #include "ql_type.h"
  25. #include "ql_gpio.h"
  26. #include "ql_app_feature_config.h"
  27. #include "quec_pin_index.h"
  28. /*===========================================================================
  29. * Macro
  30. ===========================================================================*/
  31. #define QUEC_PIN_NONE 0xff
  32. //different projects are changed into different corresponding relationships
  33. //for power demo
  34. #define QL_FUN_NUM_UART_2_CTS 3
  35. #define QL_FUN_NUM_UART_3_TXD 4
  36. //for ledcfg demo
  37. #define QL_GPIO_PIN_MAX QUEC_PIN_CFG_MAX
  38. #define QL_PIN_NUM_KEYOUT_5 QUEC_PIN_DNAME_KEYOUT_5
  39. #define QL_PIN_GPIO1 126
  40. #define QL_PIN_GPIO1_FUNC_ZSP_CTS 3
  41. #define QL_PIN_FLASH_DATA2 79
  42. #define QL_PIN_FLASH_DATA2_FUNC_FLASH_SIO2 1
  43. #if (defined QL_APP_PROJECT_DEF_EC800G) || (defined QL_APP_PROJECT_DEF_EG800G)
  44. #define QL_PIN_NET_MODE 16
  45. #define QL_PIN_NET_MODE_FUNC_GPIO 0
  46. #define QL_GPIO_NET_MODE GPIO_2
  47. #define QL_PIN_NET_STATUS 16
  48. #define QL_PIN_NET_STATUS_FUNC 5
  49. #define QL_PIN_SIM0_HOTPLUG 79
  50. #define QL_PIN_SIM0_HOTPLUG_FUNC_GPIO 0
  51. #define QL_GPIO_SIM0_HOTPLUG GPIO_19
  52. #elif defined QL_APP_PROJECT_DEF_EC600G
  53. #define QL_PIN_NET_MODE 52
  54. #define QL_PIN_NET_MODE_FUNC_GPIO 0
  55. #define QL_GPIO_NET_MODE GPIO_0
  56. #define QL_PIN_NET_STATUS 54
  57. #define QL_PIN_NET_STATUS_FUNC 5
  58. #define QL_PIN_SIM0_HOTPLUG 9
  59. #define QL_PIN_SIM0_HOTPLUG_FUNC_GPIO 0
  60. #define QL_GPIO_SIM0_HOTPLUG GPIO_6
  61. #elif defined QL_APP_PROJECT_DEF_EG700G
  62. #define QL_PIN_NET_MODE 81
  63. #define QL_PIN_NET_MODE_FUNC_GPIO 2
  64. #define QL_GPIO_NET_MODE GPIO_39
  65. #define QL_PIN_NET_STATUS 45
  66. #define QL_PIN_NET_STATUS_FUNC 1
  67. #define QL_PIN_SIM0_HOTPLUG 22
  68. #define QL_PIN_SIM0_HOTPLUG_FUNC_GPIO 1
  69. #define QL_GPIO_SIM0_HOTPLUG GPIO_9
  70. #elif defined QL_APP_PROJECT_DEF_EC200G
  71. #define QL_PIN_NET_MODE 5
  72. #define QL_PIN_NET_MODE_FUNC_GPIO 0
  73. #define QL_GPIO_NET_MODE GPIO_0
  74. #define QL_PIN_NET_STATUS 6
  75. #define QL_PIN_NET_STATUS_FUNC 0
  76. #define QL_PIN_SIM0_HOTPLUG 13
  77. #define QL_PIN_SIM0_HOTPLUG_FUNC_GPIO 0
  78. #define QL_GPIO_SIM0_HOTPLUG GPIO_3
  79. #define QL_PIN_SIM1_HOTPLUG 3
  80. #define QL_PIN_SIM1_HOTPLUG_FUNC_GPIO 0
  81. #define QL_GPIO_SIM1_HOTPLUG GPIO_1
  82. #endif
  83. //for sdmmc demo
  84. #define QL_SDMMC_PIN_DET QUEC_PIN_SD_DET
  85. #define QL_PIN_SDMMC_CMD QUEC_PIN_SDMMC_CMD
  86. #define QL_PIN_SDMMC_DATA_0 QUEC_PIN_SDMMC_DATA_0
  87. #define QL_PIN_SDMMC_DATA_1 QUEC_PIN_SDMMC_DATA_1
  88. #define QL_PIN_SDMMC_DATA_2 QUEC_PIN_SDMMC_DATA_2
  89. #define QL_PIN_SDMMC_DATA_3 QUEC_PIN_SDMMC_DATA_3
  90. #define QL_PIN_SDMMC_CLK QUEC_PIN_SDMMC_CLK
  91. #define QL_PIN_SDMMC_MODE_FUNC 0
  92. #define QL_PIN_SDMMC_MODE_FUNC_GPIO 2
  93. //for gpio/gpio_int demo
  94. #define QL_TEST1_PIN_GPIO0 QUEC_PIN_DNAME_GPIO_0
  95. #define QL_TEST1_PIN_GPIO0_FUNC_GPIO 0
  96. #define QL_TEST1_PIN_GPIO0_FUNC_FLASH1_CLK 1
  97. #define QL_TEST1_PIN_GPIO1 QUEC_PIN_DNAME_GPIO_1
  98. #define QL_TEST1_PIN_GPIO1_FUNC_GPIO 0
  99. #define QL_TEST1_PIN_GPIO1_FUNC_FLASH1_CS 1
  100. #define QL_TEST2_PIN_GPIO0 QUEC_PIN_DNAME_SPI_LCD_SIO
  101. #define QL_TEST2_PIN_GPIO0_FUNC_GPIO 1
  102. #define QL_TEST2_PIN_GPIO0_FUNC_LCD_SIO 0
  103. #define QL_TEST2_PIN_GPIO1 QUEC_PIN_DNAME_SPI_LCD_SDC
  104. #define QL_TEST2_PIN_GPIO1_FUNC_GPIO 1
  105. #define QL_TEST2_PIN_GPIO1_FUNC_LCD_SDC 0
  106. //for rs485 demo
  107. #define QL_RS485_PIN_GPIO 25
  108. #define QL_RS485_PIN_GPIO_FUNC_GPIO 0
  109. #define QL_RS485_GPIO_NUM GPIO_0
  110. //for uart demo
  111. #define QL_UART2_TX_PIN QUEC_PIN_UART2_TXD
  112. #define QL_UART2_RX_PIN QUEC_PIN_UART2_RXD
  113. #define QL_UART3_TX_PIN QUEC_PIN_UART3_TXD
  114. #define QL_UART3_RX_PIN QUEC_PIN_UART3_RXD
  115. #define QL_UART2_TX_FUNC 0x00
  116. #define QL_UART2_RX_FUNC 0x00
  117. #define QL_UART3_TX_FUNC 0x04
  118. #define QL_UART3_RX_FUNC 0x04
  119. #ifdef __cplusplus
  120. } /*"C" */
  121. #endif
  122. #endif /* QL_PIN_CFG_H */