Skip to content

Commit 2aa6835

Browse files
authored
Merge pull request #725 from recrof/rpi_picow_refactor
tidy up rpi picow variant
2 parents 0e3933f + cbf3a03 commit 2aa6835

File tree

5 files changed

+38
-42
lines changed

5 files changed

+38
-42
lines changed
File renamed without changes.

src/helpers/rp2040/PicoWBoard.h renamed to variants/rpi_picow/PicoWBoard.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
#include <MeshCore.h>
44
#include <Arduino.h>
55

6-
// LoRa radio module pins for PicoW
7-
#define P_LORA_DIO_1 20
8-
#define P_LORA_NSS 3
9-
#define P_LORA_RESET 15
10-
#define P_LORA_BUSY 2
11-
#define P_LORA_SCLK 10
12-
#define P_LORA_MISO 12
13-
#define P_LORA_MOSI 11
14-
//#define SX126X_POWER_EN ??? // Not Sure
15-
16-
#define SX126X_DIO2_AS_RF_SWITCH true
17-
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
18-
196
// built-ins
207
#define PIN_VBAT_READ 26
218
#define ADC_MULTIPLIER (3.1 * 3.3 * 1000) // MT Uses 3.1
Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,107 @@
1-
[picow]
1+
[rpi_picow]
22
extends = rp2040_base
33
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
44
board = rpipicow
55
board_build.core = earlephilhower
66
board_build.filesystem_size = 0.5m
77
build_flags = ${rp2040_base.build_flags}
8-
-I variants/picow
8+
-I variants/rpi_picow
99
; -D PICOW
1010
; -D HW_SPI1_DEVICE
11+
-D P_LORA_DIO_1=20
12+
-D P_LORA_NSS=3
13+
-D P_LORA_RESET=15
14+
-D P_LORA_BUSY=2
15+
-D P_LORA_SCLK=10
16+
-D P_LORA_MISO=12
17+
-D P_LORA_MOSI=11
18+
-D SX126X_DIO2_AS_RF_SWITCH=true
19+
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
1120
-D SX126X_CURRENT_LIMIT=130
21+
-D SX126X_RX_BOOSTED_GAIN=1
22+
-D LORA_TX_POWER=22
1223
-D RADIO_CLASS=CustomSX1262
1324
-D WRAPPER_CLASS=CustomSX1262Wrapper
14-
-D LORA_TX_POWER=22
15-
-D SX126X_RX_BOOSTED_GAIN=1
1625
build_src_filter = ${rp2040_base.build_src_filter}
17-
+<helpers/rp2040/PicoWBoard.cpp>
18-
+<../variants/picow>
26+
+<PicoWBoard.cpp>
27+
+<../variants/rpi_picow>
1928
lib_deps = ${rp2040_base.lib_deps}
2029

2130
[env:PicoW_Repeater]
22-
extends = picow
23-
build_flags = ${picow.build_flags}
31+
extends = rpi_picow
32+
build_flags = ${rpi_picow.build_flags}
2433
-D ADVERT_NAME='"PicoW Repeater"'
2534
-D ADVERT_LAT=0.0
2635
-D ADVERT_LON=0.0
2736
-D ADMIN_PASSWORD='"password"'
2837
-D MAX_NEIGHBOURS=8
2938
; -D MESH_PACKET_LOGGING=1
3039
; -D MESH_DEBUG=1
31-
build_src_filter = ${picow.build_src_filter}
40+
build_src_filter = ${rpi_picow.build_src_filter}
3241
+<../examples/simple_repeater>
3342

3443
[env:PicoW_room_server]
35-
extends = picow
36-
build_flags = ${picow.build_flags}
44+
extends = rpi_picow
45+
build_flags = ${rpi_picow.build_flags}
3746
-D ADVERT_NAME='"Test Room"'
3847
-D ADVERT_LAT=0.0
3948
-D ADVERT_LON=0.0
4049
-D ADMIN_PASSWORD='"password"'
4150
-D ROOM_PASSWORD='"hello"'
4251
; -D MESH_PACKET_LOGGING=1
4352
; -D MESH_DEBUG=1
44-
build_src_filter = ${picow.build_src_filter}
53+
build_src_filter = ${rpi_picow.build_src_filter}
4554
+<../examples/simple_room_server>
4655

4756
[env:PicoW_companion_radio_usb]
48-
extends = picow
49-
build_flags = ${picow.build_flags}
57+
extends = rpi_picow
58+
build_flags = ${rpi_picow.build_flags}
5059
-D MAX_CONTACTS=100
5160
-D MAX_GROUP_CHANNELS=8
5261
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
5362
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
54-
build_src_filter = ${picow.build_src_filter}
63+
build_src_filter = ${rpi_picow.build_src_filter}
5564
+<../examples/companion_radio/*.cpp>
56-
lib_deps = ${picow.lib_deps}
65+
lib_deps = ${rpi_picow.lib_deps}
5766
densaugeo/base64 @ ~1.4.0
5867

5968
; [env:PicoW_companion_radio_ble]
60-
; extends = picow
61-
; build_flags = ${picow.build_flags}
69+
; extends = rpi_picow
70+
; build_flags = ${rpi_picow.build_flags}
6271
; -D MAX_CONTACTS=100
6372
; -D MAX_GROUP_CHANNELS=8
6473
; -D BLE_PIN_CODE=123456
6574
; -D BLE_DEBUG_LOGGING=1
6675
; ; -D MESH_PACKET_LOGGING=1
6776
; ; -D MESH_DEBUG=1
68-
; build_src_filter = ${picow.build_src_filter}
77+
; build_src_filter = ${rpi_picow.build_src_filter}
6978
; +<../examples/companion_radio/*.cpp>
70-
; lib_deps = ${picow.lib_deps}
79+
; lib_deps = ${rpi_picow.lib_deps}
7180
; densaugeo/base64 @ ~1.4.0
7281

7382
; [env:PicoW_companion_radio_wifi]
74-
; extends = picow
75-
; build_flags = ${picow.build_flags}
83+
; extends = rpi_picow
84+
; build_flags = ${rpi_picow.build_flags}
7685
; -D MAX_CONTACTS=100
7786
; -D MAX_GROUP_CHANNELS=8
7887
; -D WIFI_DEBUG_LOGGING=1
7988
; -D WIFI_SSID='"myssid"'
8089
; -D WIFI_PWD='"mypwd"'
8190
; ; -D MESH_PACKET_LOGGING=1
8291
; ; -D MESH_DEBUG=1
83-
; build_src_filter = ${picow.build_src_filter}
92+
; build_src_filter = ${rpi_picow.build_src_filter}
8493
; +<../examples/companion_radio/*.cpp>
85-
; lib_deps = ${picow.lib_deps}
94+
; lib_deps = ${rpi_picow.lib_deps}
8695
; densaugeo/base64 @ ~1.4.0
8796

8897
[env:PicoW_terminal_chat]
89-
extends = picow
90-
build_flags = ${picow.build_flags}
98+
extends = rpi_picow
99+
build_flags = ${rpi_picow.build_flags}
91100
-D MAX_CONTACTS=100
92101
-D MAX_GROUP_CHANNELS=1
93102
; -D MESH_PACKET_LOGGING=1
94103
; -D MESH_DEBUG=1
95-
build_src_filter = ${picow.build_src_filter}
104+
build_src_filter = ${rpi_picow.build_src_filter}
96105
+<../examples/simple_secure_chat/main.cpp>
97-
lib_deps = ${picow.lib_deps}
106+
lib_deps = ${rpi_picow.lib_deps}
98107
densaugeo/base64 @ ~1.4.0
File renamed without changes.

variants/picow/target.h renamed to variants/rpi_picow/target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define RADIOLIB_STATIC_ONLY 1
44
#include <RadioLib.h>
55
#include <helpers/radiolib/RadioLibWrappers.h>
6-
#include <helpers/rp2040/PicoWBoard.h>
6+
#include <PicoWBoard.h>
77
#include <helpers/radiolib/CustomSX1262Wrapper.h>
88
#include <helpers/AutoDiscoverRTCClock.h>
99
#include <helpers/SensorManager.h>

0 commit comments

Comments
 (0)