summaryrefslogtreecommitdiff
path: root/boards.h
blob: 153a65041288bc2113893aab12346fdd5ac4c6b4 (plain)
  1. #pragma once
  2. #if defined(LILYGO_T5_V213)
  3. #define EPD_MOSI (23)
  4. #define EPD_MISO (-1)
  5. #define EPD_SCLK (18)
  6. #define EPD_CS (5)
  7. #define EPD_BUSY (4)
  8. #define EPD_RSET (16)
  9. #define EPD_DC (17)
  10. #define SDCARD_CS (13)
  11. #define SDCARD_MOSI (15)
  12. #define SDCARD_MISO (2)
  13. #define SDCARD_SCLK (14)
  14. #define BUTTON_1 (39)
  15. #define BUTTONS {39}
  16. #define BUTTON_COUNT (1)
  17. #define LED_PIN (19)
  18. #define LED_ON (LOW)
  19. #define ADC_PIN (35)
  20. #define _HAS_ADC_DETECTED_
  21. #define _HAS_LED_
  22. #define _HAS_SDCARD_
  23. #elif defined(LILYGO_T5_V22)
  24. #define EPD_MOSI (23)
  25. #define EPD_MISO (2)
  26. #define EPD_SCLK (18)
  27. #define EPD_CS (5)
  28. #define EPD_BUSY (4)
  29. #define EPD_RSET (12)
  30. #define EPD_DC (19)
  31. #define SDCARD_CS (13)
  32. #define BUTTON_1 (37)
  33. #define BUTTON_2 (38)
  34. #define BUTTON_3 (39)
  35. #define BUTTONS {37,38,39}
  36. #define BUTTON_COUNT (3)
  37. #define LED_PIN (26)
  38. #define LED_ON (HIGH)
  39. #define ADC_PIN (35)
  40. #define SPERKER_PIN (25)
  41. #define LEDC_CHANNEL_0 (0)
  42. #define _HAS_ADC_DETECTED_
  43. #define _HAS_LED_
  44. #define _HAS_SPEAKER_
  45. #define _BUILTIN_DAC_
  46. #define _USE_SHARED_SPI_BUS_
  47. #define _HAS_SDCARD_
  48. #elif defined(LILYGO_T5_V24)
  49. #define EPD_MOSI (23)
  50. #define EPD_MISO (-1) //elink no use
  51. #define EPD_SCLK (18)
  52. #define EPD_BUSY (4)
  53. #define EPD_RSET (16)
  54. #define EPD_DC (17)
  55. #define EPD_CS (5)
  56. #define SDCARD_CS (13)
  57. #define SDCARD_MOSI (15)
  58. #define SDCARD_MISO (2)
  59. #define SDCARD_SCLK (14)
  60. #define BUTTON_1 (37)
  61. #define BUTTON_2 (38)
  62. #define BUTTON_3 (39)
  63. #define SPK_POWER_EN (19)
  64. #define BUTTONS {37,38,39}
  65. #define BUTTON_COUNT (3)
  66. #define LED_PIN (26)
  67. #define LED_ON (LOW)
  68. #define ADC_PIN (35)
  69. #define SPERKER_PIN (25)
  70. #define LEDC_CHANNEL_0 (0)
  71. #define _HAS_ADC_DETECTED_
  72. #define _HAS_LED_
  73. #define _HAS_SPEAKER_
  74. #define _BUILTIN_DAC_
  75. #define _HAS_SDCARD_
  76. #define _HAS_PWR_CTRL_
  77. #elif defined(LILYGO_T5_V28)
  78. #define EPD_MOSI (23)
  79. #define EPD_MISO (-1)
  80. #define EPD_SCLK (18)
  81. #define EPD_CS (5)
  82. #define EPD_BUSY (4)
  83. #define EPD_RSET (16)
  84. #define EPD_DC (17)
  85. #define SDCARD_CS (13)
  86. #define SDCARD_MOSI (15)
  87. #define SDCARD_MISO (2)
  88. #define SDCARD_SCLK (14)
  89. #define BUTTON_1 (37)
  90. #define BUTTON_2 (38)
  91. #define BUTTON_3 (39)
  92. #define IIS_WS (25)
  93. #define IIS_BCK (26)
  94. #define IIS_DOUT (19)
  95. #define ICS43434_WS (33)
  96. #define ICS43434_BCK (32)
  97. #define ICS43434_DIN (27)
  98. #define I2C_SDA (21)
  99. #define I2C_SCL (22)
  100. #define BUTTONS {37,38,39}
  101. #define BUTTON_COUNT (3)
  102. #define LED_PIN (22)
  103. #define LED_ON (HIGH)
  104. #define ADC_PIN (35)
  105. #define _HAS_ADC_DETECTED_
  106. #define _HAS_LED_
  107. // #define _HAS_SPEAKER_
  108. #define _HAS_SDCARD_
  109. #elif defined(LILYGO_T5_V102)
  110. #define EPD_MOSI (21)
  111. #define EPD_MISO (-1)
  112. #define EPD_SCLK (22)
  113. #define EPD_CS (5)
  114. #define EPD_BUSY (34)
  115. #define EPD_RSET (4)
  116. #define EPD_DC (19)
  117. #define EPD_POWER_ENABLE (27)
  118. #define SDCARD_CS (13)
  119. #define SDCARD_MOSI (15)
  120. #define SDCARD_MISO (2)
  121. #define SDCARD_SCLK (14)
  122. #define BUTTON_1 (36)
  123. #define BUTTON_2 (39)
  124. #define BUTTON_3 (0u)
  125. #define BUTTONS {36,39,0}
  126. #define BUTTON_COUNT (3)
  127. #define ADC_PIN (35)
  128. #define _HAS_ADC_DETECTED_
  129. #define _HAS_SDCARD_
  130. #elif defined(LILYGO_T5_V266)
  131. #define EPD_MOSI (23)
  132. #define EPD_MISO (-1)
  133. #define EPD_SCLK (18)
  134. #define EPD_CS (5)
  135. #define EPD_BUSY (34)
  136. #define EPD_RSET (4)
  137. #define EPD_DC (19)
  138. #define SDCARD_CS (13)
  139. #define SDCARD_MOSI (15)
  140. #define SDCARD_MISO (2)
  141. #define SDCARD_SCLK (14)
  142. #define BUTTON_1 (39)
  143. #define BUTTONS {39}
  144. #define BUTTON_COUNT (1)
  145. #define LED_PIN (12)
  146. #define LED_ON (LOW)
  147. #define ADC_PIN (35)
  148. #define _HAS_ADC_DETECTED_
  149. #define _HAS_LED_
  150. #define _HAS_SDCARD_
  151. #elif defined(LILYGO_EPD_DISPLAY)
  152. #define EPD_MOSI (21)
  153. #define EPD_MISO (-1)
  154. #define EPD_SCLK (22)
  155. #define EPD_CS (5)
  156. #define EPD_BUSY (18)
  157. #define EPD_RSET (23)
  158. #define EPD_DC (19)
  159. #define EPD_POWER_ENABLE (14)
  160. #define BUTTON_1 (35)
  161. #define BUTTON_COUNT (1)
  162. #define ADC_PIN (34)
  163. #define RGB_STRIP_PIN (4)
  164. #define RGB_STRIP_COUNT (1)
  165. #define _HAS_ADC_DETECTED_
  166. #define _HAS_POWER_CONTROL_
  167. #define _HAS_RGB_PIXEL_
  168. #elif defined(LILYGO_EPD_DISPLAY_154)
  169. #define EPD_MOSI (13)
  170. #define EPD_MISO (-1)
  171. #define EPD_SCLK (14)
  172. #define EPD_CS (15)
  173. #define EPD_BUSY (16)
  174. #define EPD_RSET (17)
  175. #define EPD_DC (2)
  176. #define EPD_BACKLIGHT_PIN (0)
  177. #define EPD_POWER_ENABLE (5)
  178. #define BUTTON_1 (35)
  179. #define BUTTON_COUNT (1)
  180. #define ADC_PIN (34)
  181. #define MOTOR_PIN (4)
  182. #define GPS_TX_PIN (22)
  183. #define GPS_RX_PIN (21)
  184. #define GPS_1PPS_PIN (19)
  185. #define GPS_RESET_PIN (23)
  186. #define GPS_WAKEUP_PIN (18)
  187. #define _HAS_ADC_DETECTED_
  188. #define _HAS_POWER_CONTROL_
  189. #define _HAS_GPS_
  190. #elif defined(LILYGO_TBLOCK)
  191. #define EPD_MOSI (23)
  192. #define EPD_MISO (-1)
  193. #define EPD_SCLK (18)
  194. #define EPD_CS (5)
  195. #define EPD_BUSY (38)
  196. #define EPD_RSET (27)
  197. #define EPD_DC (19)
  198. #define BUTTON_1 (36)
  199. #define BUTTON_COUNT (1)
  200. #define _HAS_RTC_
  201. #else
  202. #error "Please select model !!!"
  203. #endif