board_config.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #elif defined(BOARD_ESP32C3_DEV)
  12. #define BOARD_ID 2
  13. #define PIN_CAN_TX GPIO_NUM_5
  14. #define PIN_CAN_RX GPIO_NUM_4
  15. #define PIN_UART_TX 3
  16. #define PIN_UART_RX 2
  17. #elif defined(BOARD_BLUEMARK_DB200)
  18. #define BOARD_ID 3
  19. #define PIN_CAN_TX GPIO_NUM_0 // this goes to the TX pin (= input) of the NXP CAN transceiver
  20. #define PIN_CAN_RX GPIO_NUM_5
  21. #define PIN_CAN_EN GPIO_NUM_4 // EN pin of the NXP CAN transceiver
  22. #define PIN_CAN_nSILENT GPIO_NUM_1 // CAN silent pin, active low
  23. #define CAN_APP_NODE_NAME "BlueMark DB200"
  24. // to enable termination resistors uncomment this line
  25. //#define PIN_CAN_TERM GPIO_NUM_10 // if set to ON, the termination resistors of the CAN bus are enabled
  26. #define PIN_UART_TX 3
  27. #define PIN_UART_RX 2
  28. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  29. #define STATUS_LED_ON 1
  30. #elif defined(BOARD_BLUEMARK_DB110)
  31. #define BOARD_ID 4
  32. #define PIN_UART_TX 5
  33. #define PIN_UART_RX 4
  34. #define PIN_STATUS_LED GPIO_NUM_8 // LED to signal the status
  35. #define STATUS_LED_ON 1
  36. #else
  37. #error "unsupported board"
  38. #endif