Skip to content

Commit d89001f

Browse files
committed
feat(variants): Add initial support for fobe_quill_esp32s3_mesh
This commit introduces the necessary files and configurations for the fobe_quill_esp32s3_mesh variant, including pin definitions and initialization routines. Signed-off-by: Chiho Sin <[email protected]>
1 parent e51d3c1 commit d89001f

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed
22.5 KB
Binary file not shown.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
#define USB_VID 0x303A
8+
#define USB_PID 0x82F4
9+
#define USB_MANUFACTURER "FoBE Studio"
10+
#define USB_PRODUCT "FoBE Quill ESP32S3 Mesh"
11+
#define USB_SERIAL "" // Empty string for MAC address
12+
13+
// User LED
14+
#define LED_BUILTIN 11
15+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
16+
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+
*/
30+
static const uint8_t TX = 9;
31+
static const uint8_t RX = 8;
32+
33+
/*
34+
* Wire Interfaces
35+
*/
36+
static const uint8_t SDA = 14;
37+
static const uint8_t SCL = 13;
38+
39+
/*
40+
* SPI interfaces
41+
*/
42+
static const uint8_t SS = 45;
43+
static const uint8_t MOSI = 39;
44+
static const uint8_t SCK = 40;
45+
static const uint8_t MISO = 41;
46+
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+
*/
82+
static const uint8_t A0 = 2;
83+
static const uint8_t A1 = 3;
84+
static const uint8_t A2 = 4;
85+
static const uint8_t A3 = 5;
86+
static const uint8_t A4 = 6;
87+
static const uint8_t A5 = 7;
88+
static const uint8_t D0 = 8;
89+
static const uint8_t D1 = 9;
90+
static const uint8_t D2 = 11;
91+
static const uint8_t D3 = 38;
92+
static const uint8_t D4 = 37;
93+
static const uint8_t D5 = 36;
94+
static const uint8_t D6 = 35;
95+
static const uint8_t D7 = 34;
96+
static const uint8_t D8 = 33;
97+
static const uint8_t D9 = 47;
98+
static const uint8_t D10 = 48;
99+
static const uint8_t D11 = 21;
100+
static const uint8_t D12 = 18;
101+
static const uint8_t D13 = 17;
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;
106+
107+
#endif /* Pins_Arduino_h */
177 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "esp32-hal-gpio.h"
2+
#include "pins_arduino.h"
3+
4+
extern "C" {
5+
6+
void initVariant(void) {
7+
// Turn on the peripheral power
8+
pinMode(PIN_PERI_EN, OUTPUT);
9+
digitalWrite(PIN_PERI_EN, HIGH);
10+
11+
// Turn on the OLED power
12+
pinMode(PIN_OLED_EN, OUTPUT);
13+
digitalWrite(PIN_OLED_EN, HIGH);
14+
}
15+
}

0 commit comments

Comments
 (0)