Skip to content

Commit 2b82f27

Browse files
authored
Merge branch 'espressif:master' into master
2 parents 93c0639 + 0af58cb commit 2b82f27

File tree

9 files changed

+617
-4
lines changed

9 files changed

+617
-4
lines changed

boards.txt

Lines changed: 409 additions & 2 deletions
Large diffs are not rendered by default.

docs/source/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SoC Stable Development Datasheet
4040
ESP32 Yes Yes `ESP32`_
4141
ESP32-S2 Yes Yes `ESP32-S2`_
4242
ESP32-C3 Yes Yes `ESP32-C3`_
43-
ESP32-S3 No Yes `ESP32-S3`_
43+
ESP32-S3 Yes Yes `ESP32-S3`_
4444
======== ====== =========== ===================================
4545

4646
See `Boards <boards/boards.html>`_ for more details about ESP32 development boards.

variants/bpi_leaf_s3/pins_arduino.h

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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 0x80df
9+
#define USB_MANUFACTURER "Banana Pi"
10+
#define USB_PRODUCT "BPI-Leaf-S3"
11+
#define USB_SERIAL ""
12+
13+
#define EXTERNAL_NUM_INTERRUPTS 46
14+
#define NUM_DIGITAL_PINS 48
15+
#define NUM_ANALOG_INPUTS 20
16+
17+
// Some boards have too low voltage on this pin (board design bug)
18+
// Use different pin with 3V and connect with 48
19+
// and change this setup for the chosen pin (for example 38)
20+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48;
21+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
22+
#define LED_BUILTIN LED_BUILTIN
23+
#define RGB_BUILTIN LED_BUILTIN
24+
#define RGB_BRIGHTNESS 25
25+
26+
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
27+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
28+
#define digitalPinHasPWM(p) (p < 46)
29+
30+
static const uint8_t TX = 43;
31+
static const uint8_t RX = 44;
32+
33+
static const uint8_t SDA = 15;
34+
static const uint8_t SCL = 16;
35+
36+
static const uint8_t SS = 10;
37+
static const uint8_t MOSI = 11;
38+
static const uint8_t MISO = 13;
39+
static const uint8_t SCK = 12;
40+
41+
static const uint8_t A0 = 1;
42+
static const uint8_t A1 = 2;
43+
static const uint8_t A2 = 3;
44+
static const uint8_t A3 = 4;
45+
static const uint8_t A4 = 5;
46+
static const uint8_t A5 = 6;
47+
static const uint8_t A6 = 7;
48+
static const uint8_t A7 = 8;
49+
static const uint8_t A8 = 9;
50+
static const uint8_t A9 = 10;
51+
static const uint8_t A10 = 11;
52+
static const uint8_t A11 = 12;
53+
static const uint8_t A12 = 13;
54+
static const uint8_t A13 = 14;
55+
static const uint8_t A14 = 15;
56+
static const uint8_t A15 = 16;
57+
static const uint8_t A16 = 17;
58+
static const uint8_t A17 = 18;
59+
static const uint8_t A18 = 19;
60+
static const uint8_t A19 = 20;
61+
62+
static const uint8_t T1 = 1;
63+
static const uint8_t T2 = 2;
64+
static const uint8_t T3 = 3;
65+
static const uint8_t T4 = 4;
66+
static const uint8_t T5 = 5;
67+
static const uint8_t T6 = 6;
68+
static const uint8_t T7 = 7;
69+
static const uint8_t T8 = 8;
70+
static const uint8_t T9 = 9;
71+
static const uint8_t T10 = 10;
72+
static const uint8_t T11 = 11;
73+
static const uint8_t T12 = 12;
74+
static const uint8_t T13 = 13;
75+
static const uint8_t T14 = 14;
76+
77+
#endif /* Pins_Arduino_h */
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, 0, ota_0, 0x10000, 2048K,
8+
ota_1, 0, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
ffat, data, fat, 0x450000, 3776K,
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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 0x80F8
9+
#define USB_MANUFACTURER "Cytron"
10+
#define USB_PRODUCT "Maker Feather AIoT S3"
11+
#define USB_SERIAL ""
12+
13+
#define EXTERNAL_NUM_INTERRUPTS 46
14+
#define NUM_DIGITAL_PINS 20
15+
#define NUM_ANALOG_INPUTS 12
16+
17+
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
18+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
19+
#define digitalPinHasPWM(p) (p < 46)
20+
21+
22+
23+
static const uint8_t LED_BUILTIN = 2; // Status LED.
24+
static const uint8_t RGB_BUILTIN = SOC_GPIO_PIN_COUNT + 46; // RGB LED.
25+
26+
#define BUILTIN_LED LED_BUILTIN // Backward compatibility
27+
#define LED_BUILTIN LED_BUILTIN
28+
#define LED LED_BUILTIN
29+
#define RGB_BUILTIN RGB_BUILTIN
30+
#define RGB RGB_BUILTIN
31+
#define NEOPIXEL RGB_BUILTIN
32+
#define RGB_BRIGHTNESS 65
33+
34+
35+
36+
#define VP_EN 11 // V Peripheral Enable.
37+
#define BUZZER 12 // Piezo Buzzer.
38+
#define BOOT 0 // Boot Button.
39+
#define BUTTON 3 // User Button.
40+
41+
#define VIN 13 // Vin Sense.
42+
#define VBATT 13
43+
#define VOLTAGE_MONITOR 13
44+
45+
46+
static const uint8_t TX = 15;
47+
static const uint8_t RX = 16;
48+
49+
static const uint8_t SDA = 42;
50+
static const uint8_t SCL = 41;
51+
52+
static const uint8_t SS = 7;
53+
static const uint8_t MOSI = 8;
54+
static const uint8_t SCK = 17;
55+
static const uint8_t MISO = 18;
56+
57+
static const uint8_t A0 = 10;
58+
static const uint8_t A1 = 9;
59+
static const uint8_t A2 = 6;
60+
static const uint8_t A3 = 5;
61+
static const uint8_t A4 = 4;
62+
static const uint8_t A5 = 7;
63+
64+
static const uint8_t A6 = 17;
65+
static const uint8_t A7 = 8;
66+
static const uint8_t A8 = 18;
67+
static const uint8_t A9 = 16;
68+
static const uint8_t A10 = 15;
69+
static const uint8_t A11 = 14;
70+
static const uint8_t A12 = 13;
71+
72+
static const uint8_t T4 = 4;
73+
static const uint8_t T5 = 5;
74+
static const uint8_t T6 = 6;
75+
static const uint8_t T7 = 7;
76+
static const uint8_t T8 = 8;
77+
static const uint8_t T9 = 9;
78+
static const uint8_t T10 = 10;
79+
static const uint8_t T14 = 14;
80+
81+
#endif /* Pins_Arduino_h */
Binary file not shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2022 Wai Weng for Cytron Technologies
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
26+
#include "esp32-hal-gpio.h"
27+
#include "pins_arduino.h"
28+
29+
extern "C" {
30+
31+
// Initialize variant/board, called before setup()
32+
void initVariant(void)
33+
{
34+
// Turn on VPeripheral by default.
35+
pinMode(VP_EN, OUTPUT);
36+
digitalWrite(VP_EN, HIGH);
37+
}
38+
}

variants/tamc_termod_s3/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ float getBatteryCapacity() {
1515
}
1616

1717
bool getChargingState() {
18-
pinMode(CHG, INPUT_PULLUP);
1918
return !digitalRead(CHG);
2019
}
2120

@@ -33,6 +32,7 @@ void ARDUINO_ISR_ATTR chargeIsr() {
3332
}
3433

3534
extern "C" void initVariant(void){
35+
pinMode(CHG, INPUT_PULLUP);
3636
attachInterrupt(CHG, chargeIsr, CHANGE);
3737
analogReadResolution(12);
3838
}

0 commit comments

Comments
 (0)