mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add RAK4631 support for rs232 bridge
This commit is contained in:
parent
5f06dc4a2f
commit
eafbd85d17
2 changed files with 46 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ void RS232Bridge::begin() {
|
||||||
|
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
((HardwareSerial *)_serial)->setPins(WITH_RS232_BRIDGE_RX, WITH_RS232_BRIDGE_TX);
|
((HardwareSerial *)_serial)->setPins(WITH_RS232_BRIDGE_RX, WITH_RS232_BRIDGE_TX);
|
||||||
|
#elif defined(RAK_4631)
|
||||||
|
((Uart *)_serial)->setPins(WITH_RS232_BRIDGE_RX, WITH_RS232_BRIDGE_TX);
|
||||||
#elif defined(NRF52_PLATFORM)
|
#elif defined(NRF52_PLATFORM)
|
||||||
((HardwareSerial *)_serial)->setPins(WITH_RS232_BRIDGE_RX, WITH_RS232_BRIDGE_TX);
|
((HardwareSerial *)_serial)->setPins(WITH_RS232_BRIDGE_RX, WITH_RS232_BRIDGE_TX);
|
||||||
#elif defined(RP2040_PLATFORM)
|
#elif defined(RP2040_PLATFORM)
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,50 @@ build_src_filter = ${rak4631.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/simple_repeater>
|
+<../examples/simple_repeater>
|
||||||
|
|
||||||
|
[env:RAK_4631_repeater_bridge_rs232_tx0_rx0]
|
||||||
|
extends = rak4631
|
||||||
|
build_flags =
|
||||||
|
${rak4631.build_flags}
|
||||||
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
|
-D ADVERT_NAME='"RS232 Bridge"'
|
||||||
|
-D ADVERT_LAT=0.0
|
||||||
|
-D ADVERT_LON=0.0
|
||||||
|
-D ADMIN_PASSWORD='"password"'
|
||||||
|
-D MAX_NEIGHBOURS=50
|
||||||
|
-D WITH_RS232_BRIDGE=Serial2
|
||||||
|
-D WITH_RS232_BRIDGE_RX=19
|
||||||
|
-D WITH_RS232_BRIDGE_TX=20
|
||||||
|
; -D BRIDGE_DEBUG=1
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
; -D CORE_DEBUG_LEVEL=3
|
||||||
|
build_src_filter = ${rak4631.build_src_filter}
|
||||||
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/bridges/RS232Bridge.cpp>
|
||||||
|
+<../examples/simple_repeater>
|
||||||
|
|
||||||
|
[env:RAK_4631_repeater_bridge_rs232_tx1_rx1]
|
||||||
|
extends = rak4631
|
||||||
|
build_flags =
|
||||||
|
${rak4631.build_flags}
|
||||||
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
|
-D ADVERT_NAME='"RS232 Bridge"'
|
||||||
|
-D ADVERT_LAT=0.0
|
||||||
|
-D ADVERT_LON=0.0
|
||||||
|
-D ADMIN_PASSWORD='"password"'
|
||||||
|
-D MAX_NEIGHBOURS=50
|
||||||
|
-D WITH_RS232_BRIDGE=Serial1
|
||||||
|
-D WITH_RS232_BRIDGE_RX=15
|
||||||
|
-D WITH_RS232_BRIDGE_TX=16
|
||||||
|
; -D BRIDGE_DEBUG=1
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
; -D CORE_DEBUG_LEVEL=3
|
||||||
|
build_src_filter = ${rak4631.build_src_filter}
|
||||||
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
|
+<helpers/bridges/RS232Bridge.cpp>
|
||||||
|
+<../examples/simple_repeater>
|
||||||
|
|
||||||
[env:RAK_4631_room_server]
|
[env:RAK_4631_room_server]
|
||||||
extends = rak4631
|
extends = rak4631
|
||||||
build_flags =
|
build_flags =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue