Skip to content

Commit 979215d

Browse files
Nivek-domocaveman99
authored andcommitted
New variant GaulixLCrp2040V1b
in France we make with our community Gaulix base on your project our harrdware https://gaulix.fr/carte-gaulix-low-cost-30dbm/
1 parent bcc48ec commit 979215d

File tree

3 files changed

+92
-2
lines changed

3 files changed

+92
-2
lines changed

variants/GaulixLCrp2040V1b/pins_arduino.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// Pin definitions taken from:
44
// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf
55

6-
static const uint8_t WB_IO1 = 22; // SLOT_A SLOT_B
6+
static const uint8_t WB_IO1 = 22; // SLOT_A SLOT_B
77
static const uint8_t WB_IO2 = 28; // SLOT_A SLOT_B
8-
static const uint8_t WB_IO3 = 10; // SLOT_C
8+
static const uint8_t WB_IO3 = 10; // SLOT_C
99
static const uint8_t WB_IO4 = 11; // SLOT_C
1010
static const uint8_t WB_IO5 = 7; // SLOT_D
1111
static const uint8_t WB_IO6 = 6; // SLOT_D
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[env:GaulixLCrp2040V1b]
2+
extends = rp2040_base
3+
board = rakwireless_rak11300
4+
upload_protocol = picotool
5+
6+
# add our variants files to the include and src paths
7+
build_flags = ${rp2040_base.build_flags}
8+
-DRAK11310
9+
-Ivariants/rak11310
10+
-DDEBUG_RP2040_PORT=Serial
11+
-DRV3028_RTC=0x52
12+
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus"
13+
#autorise le hardware remote
14+
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=0
15+
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>
16+
lib_deps =
17+
${rp2040_base.lib_deps}
18+
${networking_base.lib_deps}
19+
melopero/Melopero RV3028@^1.1.0
20+
https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2
21+
debug_build_flags = ${rp2040_base.build_flags}, -g
22+
debug_tool = cmsis-dap ; for e.g. Picotool

variants/GaulixLCrp2040V1b/variant.h

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#define ARDUINO_ARCH_AVR
2+
3+
// Define I2C pins to ensure correct usage of both ports
4+
#define I2C_SDA 20
5+
#define I2C_SCL 21
6+
#define I2C_SDA1 10
7+
#define I2C_SCL1 11
8+
9+
#define LED_CONN PIN_LED2
10+
#define LED_PIN LED_BUILTIN
11+
#define ledOff(pin) pinMode(pin, INPUT)
12+
13+
#define BUTTON_PIN 12
14+
#define BUTTON_NEED_PULLUP
15+
#define EXT_NOTIFY_OUT 22
16+
17+
#define BATTERY_PIN PIN_A0 // 3 //29 0 //26
18+
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
19+
#define ADC_MULTIPLIER 3.05 // 3.065 //3.33 //1.84
20+
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
21+
22+
#define DETECTION_SENSOR_EN 28
23+
24+
#define USE_SX1262
25+
26+
#undef LORA_SCK
27+
#undef LORA_MISO
28+
#undef LORA_MOSI
29+
#undef LORA_CS
30+
31+
// RAK BSP somehow uses SPI1 instead of SPI0
32+
#define HW_SPI1_DEVICE
33+
#define LORA_SCK (14u)
34+
#define LORA_MOSI (15u)
35+
#define LORA_MISO (24u)
36+
#define LORA_CS (13u)
37+
38+
#define LORA_DIO0 RADIOLIB_NC // No GPIO connection
39+
#define LORA_RESET 23 // GPIO23
40+
#define LORA_BUSY 18 // GPIO18
41+
#define LORA_DIO1 16 // GPIO16
42+
#define LORA_DIO2 RADIOLIB_NC // Antenna switching, no GPIO connection
43+
#define LORA_DIO3 RADIOLIB_NC // No GPIO connection
44+
#define LORA_DIO4 17 // GPIO17
45+
46+
// On rp2040-lora board the antenna switch is wired and works with complementary-pin control logic.
47+
// See PE4259 datasheet page 4
48+
49+
#ifdef USE_SX1262
50+
#define SX126X_CS LORA_CS
51+
#define SX126X_DIO1 LORA_DIO1
52+
#define SX126X_BUSY LORA_BUSY
53+
#define SX126X_RESET LORA_RESET
54+
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
55+
#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17
56+
// #define SX126X_TXEN 19
57+
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
58+
#endif
59+
60+
#define HAS_ETHERNET 1
61+
#define PIN_ETHERNET_RESET 7 // IO3
62+
#define PIN_ETHERNET_SS 5
63+
#define ETH_SPI_PORT SPI
64+
65+
#define PIN_ETH_POWER_EN 6
66+
67+
#define MAX_NUM_NODES 500
68+
#define MAX_NUM_NODES_FS 500

0 commit comments

Comments
 (0)