@@ -22,6 +22,14 @@ extern "C" {
22
22
#define NUM_ANALOG_INPUTS (8) // A6 is used for battery, A7 is analog reference
23
23
#define NUM_ANALOG_OUTPUTS (0)
24
24
25
+ #ifdef SEEED_XIAO_D6D7_OLED
26
+ #define HAS_SCREEN 1
27
+ #define USE_SSD1306
28
+ #else
29
+ // Breaks build:
30
+ // #define HAS_SCREEN 0
31
+ #endif
32
+
25
33
// LEDs
26
34
27
35
#define LED_RED 11
@@ -56,14 +64,11 @@ extern "C" {
56
64
#define D9 (9ul)
57
65
#define D10 (10ul)
58
66
59
- /*Due to the lack of pins,and have to make sure gps standby work well we have temporarily removed the button.
60
- There are some technical solutions that can solve this problem,
61
- and we are currently exploring and researching them*/
62
-
63
- // #define BUTTON_PIN D0 // This is the Program Button
64
- // // #define BUTTON_NEED_PULLUP 1
65
- // #define BUTTON_ACTIVE_LOW true
66
- // #define BUTTON_ACTIVE_PULLUP false
67
+ // Wio-SX1262 for XIAO
68
+ // Store page: https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html
69
+ // Schematic: https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Wio-SX1262%20for%20XIAO%20V1.0_SCH.pdf
70
+ #define PIN_BUTTON1 D0
71
+ #define BUTTON_NEED_PULLUP
67
72
68
73
/*
69
74
* Analog pins
@@ -85,6 +90,15 @@ static const uint8_t A4 = PIN_A4;
85
90
static const uint8_t A5 = PIN_A5 ;
86
91
#define ADC_RESOLUTION 12
87
92
93
+ // RX and TX pins
94
+ #if defined(SEEED_XIAO_D6D7_SERIAL1 ) || defined(SEEED_XIAO_D6D7_L76K )
95
+ #define PIN_SERIAL1_RX D6
96
+ #define PIN_SERIAL1_TX D7
97
+ #else
98
+ #define PIN_SERIAL1_RX (-1)
99
+ #define PIN_SERIAL1_TX (-1)
100
+ #endif
101
+
88
102
#define PIN_SERIAL2_RX (-1)
89
103
#define PIN_SERIAL2_TX (-1)
90
104
@@ -125,23 +139,32 @@ static const uint8_t SCK = PIN_SPI_SCK;
125
139
#define I2C_NO_RESCAN // I2C is a bit finicky, don't scan too much
126
140
#define WIRE_INTERFACES_COUNT 1 // 2
127
141
128
- #define PIN_WIRE_SDA (24) // change to use the correct pins if needed
129
- #define PIN_WIRE_SCL (25) // change to use the correct pins if needed
142
+ #if defined(SEEED_XIAO_D6D7_I2C ) || defined(USE_SSD1306 )
143
+ #define PIN_WIRE_SDA D6
144
+ #define PIN_WIRE_SCL D7
145
+ #else
146
+ #define PIN_WIRE_SDA (-1)
147
+ #define PIN_WIRE_SCL (-1)
148
+ #endif
130
149
131
150
static const uint8_t SDA = PIN_WIRE_SDA ;
132
151
static const uint8_t SCL = PIN_WIRE_SCL ;
133
152
134
- // GPS L76KB
153
+ // L76K GNSS Module for Seeed Studio XIAO
154
+ // Store page: https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
155
+ // Schematic:
156
+ // https://files.seeedstudio.com/wiki/Seeeduino-XIAO-Expansion-Board/GPS_Module/L76K/109100021-L76K-GNSS-Module-for-Seeed-Studio-XIAO-Schematic.pdf
157
+ // -------------------
158
+ #ifdef SEEED_XIAO_D6D7_L76K
135
159
#define GPS_L76K
136
- #ifdef GPS_L76K
137
- #define PIN_GPS_RX D6
138
- #define PIN_GPS_TX D7
139
160
#define HAS_GPS 1
140
161
#define GPS_BAUDRATE 9600
141
162
#define GPS_THREAD_INTERVAL 50
142
- #define PIN_SERIAL1_RX PIN_GPS_TX
143
- #define PIN_SERIAL1_TX PIN_GPS_RX
144
163
#define PIN_GPS_STANDBY D0
164
+ #undef PIN_BUTTON1 // Overlapping assignment with Wio-SX1262 for XIAO user button
165
+ #define PIN_BUTTON1 (-1)
166
+ #else
167
+ #define HAS_GPS 0
145
168
#endif
146
169
147
170
// Battery
0 commit comments