board_config.h 4.2 KB

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