board_config.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. board configuration file
  3. */
  4. #pragma once
  5. #define GB_UAV_REMOTEID 1
  6. #ifdef BOARD_ESP32S3_DEV
  7. #define BOARD_ID 1
  8. // #define PIN_CAN_TX GPIO_NUM_47
  9. // #define PIN_CAN_RX GPIO_NUM_38
  10. #define PIN_CAN_TX GPIO_NUM_5
  11. #define PIN_CAN_RX GPIO_NUM_4
  12. #define PIN_UART_TX 18
  13. #define PIN_UART_RX 17
  14. // #define WS2812_LED_PIN GPIO_NUM_48
  15. #define WS2812_LED_PIN GPIO_NUM_38
  16. #elif defined(BOARD_ESP32C3_DEV)
  17. #define BOARD_ID 2
  18. #define PIN_CAN_TX GPIO_NUM_5
  19. #define PIN_CAN_RX GPIO_NUM_4
  20. #define PIN_UART_TX 3
  21. #define PIN_UART_RX 2
  22. #define WS2812_LED_PIN GPIO_NUM_8
  23. #elif defined(BOARD_BLUEMARK_DB200)
  24. #define BOARD_ID 3
  25. #define PIN_CAN_TX GPIO_NUM_0 // this goes to the TX pin (= input) of the NXP CAN transceiver
  26. #define PIN_CAN_RX GPIO_NUM_5
  27. #define PIN_CAN_EN GPIO_NUM_4 // EN pin of the NXP CAN transceiver
  28. #define PIN_CAN_nSILENT GPIO_NUM_1 // CAN silent pin, active low
  29. #define CAN_APP_NODE_NAME "BlueMark DB200"
  30. // to enable termination resistors uncomment this line
  31. //#define PIN_CAN_TERM GPIO_NUM_10 // if set to ON, the termination resistors of the CAN bus are enabled
  32. #define PIN_UART_TX 3
  33. #define PIN_UART_RX 2
  34. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  35. // LED off when ready to arm
  36. #define STATUS_LED_OK 0
  37. #elif defined(BOARD_BLUEMARK_DB110)
  38. #define BOARD_ID 4
  39. #define PIN_UART_TX 5
  40. #define PIN_UART_RX 4
  41. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  42. // LED off when ready to arm
  43. #define STATUS_LED_OK 0
  44. #elif defined(BOARD_JW_TBD)
  45. #define BOARD_ID 5
  46. #define PIN_CAN_TX GPIO_NUM_47
  47. #define PIN_CAN_RX GPIO_NUM_38
  48. #define PIN_UART_TX 18
  49. #define PIN_UART_RX 17
  50. #define PIN_STATUS_LED GPIO_NUM_5 // LED to signal the status
  51. #define LED_MODE_FLASH 1 // flashing LED configuration
  52. // LED on when ready to arm
  53. #define STATUS_LED_OK 1
  54. #define CAN_APP_NODE_NAME "JW TBD"
  55. #elif defined(BOARD_MRO_RID)
  56. #define BOARD_ID 6
  57. #define PIN_CAN_TX GPIO_NUM_0
  58. #define PIN_CAN_RX GPIO_NUM_1
  59. #define PIN_UART_TX 4
  60. #define PIN_UART_RX 5
  61. #define WS2812_LED_PIN GPIO_NUM_2
  62. #define CAN_APP_NODE_NAME "mRobotics RemoteID"
  63. #elif defined(BOARD_JWRID_ESP32S3)
  64. #define BOARD_ID 7
  65. #define PIN_CAN_TX GPIO_NUM_47
  66. #define PIN_CAN_RX GPIO_NUM_38
  67. #define PIN_UART_TX 37
  68. #define PIN_UART_RX 36
  69. #define WS2812_LED_PIN GPIO_NUM_5
  70. #define CAN_APP_NODE_NAME "JWRID_ESP32S3"
  71. #elif defined(BOARD_BLUEMARK_DB202)
  72. #define BOARD_ID 8
  73. #define PIN_UART_TX 7
  74. #define PIN_UART_RX 6
  75. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  76. // LED off when ready to arm
  77. #define STATUS_LED_OK 0
  78. #elif defined(BOARD_BLUEMARK_DB210)
  79. #define BOARD_ID 10
  80. #define PIN_CAN_TX GPIO_NUM_19
  81. #define PIN_CAN_RX GPIO_NUM_20
  82. #define PIN_UART_TX 7
  83. #define PIN_UART_RX 6
  84. //#define PIN_UART_CTS 15 //not used, perhaps useful if TELEM 1 is used for different purpose
  85. //#define PIN_UART_RTS 16 //not used, perhaps useful if TELEM 1 is used for different purpose
  86. //#define PIN_UART_TX_2 2 //TELEM 2
  87. //#define PIN_UART_RX_2 1 //TELEM 2
  88. //#define PIN_UART_CTS_2 5 //TELEM 2, not used, perhaps useful if TELEM is used for different purpose
  89. //#define PIN_UART_RTS_2 4 //TELEM 2, not used, perhaps useful if TELEM is used for different purpose
  90. #define BUZZER_PIN GPIO_NUM_39 //at the moment easiest is to have active buzzer support. (Buzzer on if GPIO is high)
  91. #define WS2812_LED_PIN GPIO_NUM_8 //there are two WS2812 LEDs on this GPIO
  92. #define CAN_APP_NODE_NAME "BlueMark DB210PRO"
  93. //#define PIN_CAN_TERM GPIO_NUM_42 // if set to ON, the termination resistors of the CAN bus are enabled
  94. #elif defined(BOARD_BLUEMARK_DB203)
  95. #define BOARD_ID 9
  96. #define PIN_CAN_TX GPIO_NUM_6
  97. #define PIN_CAN_RX GPIO_NUM_7
  98. #define PIN_UART_TX 5 // not used, but needed to avoid compilation errors
  99. #define PIN_UART_RX 4 // not used, but needed to avoid compilation errors
  100. #define CAN_APP_NODE_NAME "BlueMark DB203"
  101. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  102. // LED off when ready to arm
  103. #define STATUS_LED_OK 0
  104. #elif defined(BOARD_Holybro_RemoteID)
  105. #define BOARD_ID 11
  106. #define PIN_CAN_TX GPIO_NUM_5
  107. #define PIN_CAN_RX GPIO_NUM_4
  108. #define PIN_UART_TX 3
  109. #define PIN_UART_RX 2
  110. #define WS2812_LED_PIN GPIO_NUM_8
  111. #elif defined(BOARD_CUAV_RID)
  112. #define BOARD_ID 12
  113. #define PIN_CAN_TX GPIO_NUM_47
  114. #define PIN_CAN_RX GPIO_NUM_38
  115. #define PIN_CAN_nSILENT GPIO_NUM_1
  116. #define PIN_UART_TX 18
  117. #define PIN_UART_RX 17
  118. #define WS2812_LED_PIN GPIO_NUM_48
  119. #define PIN_CAN_TERM GPIO_NUM_37
  120. #define CAN_TERM_EN LOW
  121. #define CAN_APP_NODE_NAME "net.cuav.c-rid"
  122. #elif defined(BOARD_VKUAV_RID)
  123. #define BOARD_ID 13
  124. #define PIN_CAN_TX GPIO_NUM_47
  125. #define PIN_CAN_RX GPIO_NUM_38
  126. #define PIN_CAN_nSILENT GPIO_NUM_1
  127. #define PIN_UART_TX 18
  128. #define PIN_UART_RX 17
  129. #define WS2812_LED_PIN GPIO_NUM_33
  130. #define PIN_CAN_TERM GPIO_NUM_11
  131. #define CAN_TERM_EN LOW
  132. #define CAN_APP_NODE_NAME "vk-rid"
  133. #else
  134. #error "unsupported board"
  135. #endif