Add rs485 atom board

This commit is contained in:
free-x 2022-06-25 08:29:49 +02:00
parent 4087311922
commit a4731e67d7
2 changed files with 32 additions and 0 deletions

View File

@ -80,6 +80,29 @@
#define GWLED_BRIGHTNESS 64 #define GWLED_BRIGHTNESS 64
#endif #endif
#ifdef BOARD_M5ATOM_RS485_CANUNIT
#define ESP32_CAN_TX_PIN GPIO_NUM_26
#define ESP32_CAN_RX_PIN GPIO_NUM_32
//if using rs232
#define GWSERIAL_TX 19
#define GWSERIAL_RX 22
#define GWSERIAL_MODE "UNI"
#define GWBUTTON_PIN GPIO_NUM_39
#define GWBUTTON_ACTIVE LOW
//if GWBUTTON_PULLUPDOWN we enable a pulup/pulldown
#define GWBUTTON_PULLUPDOWN
//led handling
//if we define GWLED_FASTNET the arduino fastnet lib is used
#define GWLED_FASTLED
#define GWLED_TYPE SK6812
//color schema for fastled
#define GWLED_SCHEMA GRB
#define GWLED_PIN GPIO_NUM_27
//brightness 0...255
#define GWLED_BRIGHTNESS 64
#endif
#ifdef BOARD_M5STICK_CANUNIT #ifdef BOARD_M5STICK_CANUNIT
#define ESP32_CAN_TX_PIN GPIO_NUM_32 #define ESP32_CAN_TX_PIN GPIO_NUM_32
#define ESP32_CAN_RX_PIN GPIO_NUM_33 #define ESP32_CAN_RX_PIN GPIO_NUM_33

View File

@ -68,6 +68,15 @@ build_flags =
upload_port = /dev/esp32 upload_port = /dev/esp32
upload_protocol = esptool upload_protocol = esptool
[env:m5stack-atom-rs485-canunit]
board = m5stack-atom
lib_deps = ${env.lib_deps}
build_flags =
-D BOARD_M5ATOM_RS485_CANUNIT
${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool
[env:m5stickc-atom-canunit] [env:m5stickc-atom-canunit]
board = m5stick-c board = m5stick-c