board_config.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. #else
  52. #error "unsupported board"
  53. #endif