Skip to content

Commit de4e9b7

Browse files
authored
Merge pull request #45 from espressif/master
Final RMT fix
2 parents cb97343 + 44fbde0 commit de4e9b7

File tree

10 files changed

+91
-10
lines changed

10 files changed

+91
-10
lines changed

cores/esp32/esp32-hal-gpio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,4 +510,3 @@ extern int digitalRead(uint8_t pin) __attribute__ ((weak, alias("__digitalRead")
510510
extern void attachInterrupt(uint8_t pin, voidFuncPtr handler, int mode) __attribute__ ((weak, alias("__attachInterrupt")));
511511
extern void attachInterruptArg(uint8_t pin, voidFuncPtrArg handler, void * arg, int mode) __attribute__ ((weak, alias("__attachInterruptArg")));
512512
extern void detachInterrupt(uint8_t pin) __attribute__ ((weak, alias("__detachInterrupt")));
513-

cores/esp32/esp32-hal-rmt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,9 @@ float rmtSetTick(rmt_obj_t* rmt, float tick)
515515
rmt_obj_t* rmtInit(int pin, bool tx_not_rx, rmt_reserve_memsize_t memsize)
516516
{
517517
int buffers = memsize;
518-
rmt_obj_t* rmt;
519-
size_t i;
520-
size_t j;
518+
rmt_obj_t* rmt = NULL;
519+
size_t i = 0;
520+
size_t j = 0;
521521

522522
// create common block mutex for protecting allocs from multiple threads
523523
if (!g_rmt_block_lock) {
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
6+
nvs, data, nvs, 0x9000, 20K,
7+
otadata, data, ota, 0xe000, 8K,
8+
ota_0, 0, ota_0, 0x10000, 1408K,
9+
ota_1, 0, ota_1, 0x170000, 1408K,
10+
uf2, app, factory,0x2d0000, 256K,
11+
ffat, data, fat, 0x310000, 960K,
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
7+
#define USB_VID 0x239A
8+
#define USB_PID 0x80ED
9+
#define USB_MANUFACTURER "Adafruit"
10+
#define USB_PRODUCT "Feather ESP32-S2 Reverse TFT"
11+
#define USB_SERIAL "" // Empty string for MAC adddress
12+
13+
14+
#define EXTERNAL_NUM_INTERRUPTS 46
15+
#define NUM_DIGITAL_PINS 48
16+
#define NUM_ANALOG_INPUTS 20
17+
18+
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
19+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
20+
#define digitalPinHasPWM(p) (p < 46)
21+
22+
#define LED_BUILTIN 13
23+
24+
#define PIN_NEOPIXEL 33
25+
#define NEOPIXEL_NUM 1 // number of neopixels
26+
#define NEOPIXEL_POWER 21 // power pin
27+
#define NEOPIXEL_POWER_ON HIGH // power pin state when on
28+
29+
#define TFT_I2C_POWER 7
30+
#define TFT_CS 42
31+
#define TFT_RST 41
32+
#define TFT_DC 40
33+
#define TFT_BACKLITE 45
34+
35+
static const uint8_t SDA = 3;
36+
static const uint8_t SCL = 4;
37+
38+
static const uint8_t SS = 42;
39+
static const uint8_t MOSI = 35;
40+
static const uint8_t SCK = 36;
41+
static const uint8_t MISO = 37;
42+
43+
static const uint8_t A0 = 18;
44+
static const uint8_t A1 = 17;
45+
static const uint8_t A2 = 16;
46+
static const uint8_t A3 = 15;
47+
static const uint8_t A4 = 14;
48+
static const uint8_t A5 = 8;
49+
50+
static const uint8_t TX = 39;
51+
static const uint8_t RX = 38;
52+
static const uint8_t TX1 = 39;
53+
static const uint8_t RX1 = 38;
54+
55+
static const uint8_t T5 = 5;
56+
static const uint8_t T6 = 6;
57+
static const uint8_t T8 = 8;
58+
static const uint8_t T9 = 9;
59+
static const uint8_t T10 = 10;
60+
static const uint8_t T11 = 11;
61+
static const uint8_t T12 = 12;
62+
static const uint8_t T13 = 13;
63+
static const uint8_t T14 = 14;
64+
65+
static const uint8_t DAC1 = 17;
66+
static const uint8_t DAC2 = 18;
67+
68+
#endif /* Pins_Arduino_h */
Binary file not shown.
Binary file not shown.

variants/adafruit_feather_esp32s2_tft/pins_arduino.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@
2626
#define NEOPIXEL_POWER 34 // power pin
2727
#define NEOPIXEL_POWER_ON HIGH // power pin state when on
2828

29-
#define TFT_CS 42
30-
#define TFT_RST 41
31-
#define TFT_DC 40
29+
#define TFT_I2C_POWER 21
30+
#define TFT_CS 7
31+
#define TFT_RST 40
32+
#define TFT_DC 39
3233
#define TFT_BACKLITE 45
3334

3435
static const uint8_t SDA = 42;
3536
static const uint8_t SCL = 41;
3637

37-
static const uint8_t SS = 21;
38+
static const uint8_t SS = 7;
3839
static const uint8_t MOSI = 35;
3940
static const uint8_t SCK = 36;
4041
static const uint8_t MISO = 37;
-7.66 KB
Binary file not shown.

variants/adafruit_qtpy_esp32s2/pins_arduino.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ static const uint8_t SCL1 = 40;
3434

3535
static const uint8_t SS = 42;
3636
static const uint8_t MOSI = 35;
37-
static const uint8_t SCK = 34;
38-
static const uint8_t MISO = 33;
37+
static const uint8_t SCK = 36;
38+
static const uint8_t MISO = 37;
3939

4040
static const uint8_t A0 = 18;
4141
static const uint8_t A1 = 17;
@@ -48,6 +48,8 @@ static const uint8_t A7 = 16;
4848

4949
static const uint8_t TX = 5;
5050
static const uint8_t RX = 16;
51+
#define TX1 TX
52+
#define RX1 RX
5153

5254
static const uint8_t T5 = 5;
5355
static const uint8_t T6 = 6;

0 commit comments

Comments
 (0)