Skip to content

Commit 4a46bb5

Browse files
committed
pins: reorganize and define additional pin mappings
Updated the pins_arduino.h file to include new definitions for battery, buttons, screen, LoRa, MFP, and power pins. Removed unused definitions and ensured better organization of pin assignments for clarity. Signed-off-by: ChihoSin [email protected]
1 parent aab7458 commit 4a46bb5

File tree

1 file changed

+58
-34
lines changed

1 file changed

+58
-34
lines changed

variants/fobe_quill_esp32_s3_mesh/pins_arduino.h

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,77 @@
1414
#define LED_BUILTIN 11
1515
#define BUILTIN_LED LED_BUILTIN // backward compatibility
1616

17+
/*
18+
* Battery
19+
*/
20+
#define PIN_VBAT (10)
21+
22+
/*
23+
* Buttons
24+
*/
25+
#define PIN_BUTTON1 (0)
26+
27+
/*
28+
* Serial interfaces
29+
*/
1730
static const uint8_t TX = 9;
1831
static const uint8_t RX = 8;
19-
#define TX1 TX
20-
#define RX1 RX
2132

33+
/*
34+
* Wire Interfaces
35+
*/
2236
static const uint8_t SDA = 14;
2337
static const uint8_t SCL = 13;
24-
#define WIRE1_PIN_DEFINED
25-
static const uint8_t SDA1 = 34;
26-
static const uint8_t SCL1 = 33;
2738

39+
/*
40+
* SPI interfaces
41+
*/
2842
static const uint8_t SS = 45;
2943
static const uint8_t MOSI = 39;
3044
static const uint8_t SCK = 40;
3145
static const uint8_t MISO = 41;
3246

47+
/*
48+
* Screen
49+
*/
50+
#define PIN_OLED_SDA (14)
51+
#define PIN_OLED_SCL (13)
52+
#define PIN_OLED_EN (12)
53+
54+
/*
55+
* LoRa
56+
*/
57+
#define PIN_SX126X_NSS (45)
58+
#define PIN_SX126X_DIO1 (42)
59+
#define PIN_SX126X_BUSY (43)
60+
#define PIN_SX126X_RESET (44)
61+
#define PIN_SX126X_TXEN (-1)
62+
#define PIN_SX126X_RXEN (46)
63+
#define SX126X_DIO2_AS_RF_SWITCH
64+
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
65+
66+
/*
67+
* MFP
68+
*/
69+
#define PIN_MFP1 (38)
70+
#define PIN_MFP2 (37)
71+
#define PIN_MFP3 (36)
72+
#define PIN_MFP4 (35)
73+
74+
/*
75+
* Power
76+
*/
77+
#define PIN_PERI_EN (1)
78+
79+
/*
80+
* PINs
81+
*/
3382
static const uint8_t A0 = 2;
3483
static const uint8_t A1 = 3;
3584
static const uint8_t A2 = 4;
3685
static const uint8_t A3 = 5;
3786
static const uint8_t A4 = 6;
3887
static const uint8_t A5 = 7;
39-
4088
static const uint8_t D0 = 8;
4189
static const uint8_t D1 = 9;
4290
static const uint8_t D2 = 11;
@@ -51,33 +99,9 @@ static const uint8_t D10 = 48;
5199
static const uint8_t D11 = 21;
52100
static const uint8_t D12 = 18;
53101
static const uint8_t D13 = 17;
54-
55-
/*
56-
* Screen
57-
*/
58-
#define PIN_SSD1312_SDA (14)
59-
#define PIN_SSD1312_SCL (13) // DC
60-
#define PIN_OLED_EN (12)
61-
62-
/*
63-
* LoRa
64-
*/
65-
#define PIN_SX126X_NSS (45)
66-
#define PIN_SX126X_DIO1 (42)
67-
#define PIN_SX126X_BUSY (43)
68-
#define PIN_SX126X_RESET (44)
69-
#define PIN_SX126X_TXEN (-1)
70-
#define PIN_SX126X_RXEN (46)
71-
#define SX126X_DIO2_AS_RF_SWITCH
72-
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
73-
74-
/*
75-
* MFP Pins
76-
*/
77-
#define PIN_MFP1 (38)
78-
#define PIN_MFP2 (37)
79-
#define PIN_MFP3 (36)
80-
#define PIN_MFP4 (35)
81-
#define PIN_MFP_PWR (1)
102+
static const uint8_t MTCK = 39;
103+
static const uint8_t MTDO = 40;
104+
static const uint8_t MTDI = 41;
105+
static const uint8_t MTMS = 42;
82106

83107
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)