Skip to content

Commit cc477a5

Browse files
author
Fio
authored
Update pins_arduino.h (#8659)
Corrected analog I/O, BUILTIN_LED and added missing soc/soc_caps.h. Before neopixelWrite() would end up in / RMT GPIO ERROR / set gpio for RMT driver failed / rmtInit(): RMT failed to initilize. => None working onboard RGB LED.
1 parent 7b4d468 commit cc477a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: variants/lolin_s3/pins_arduino.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define Pins_Arduino_h
33

44
#include <stdint.h>
5+
#include "soc/soc_caps.h"
56

67
#define USB_VID 0x303a
78
#define USB_PID 0x1001
@@ -11,13 +12,13 @@
1112
#define NUM_ANALOG_INPUTS 18
1213

1314

14-
static const uint8_t LED_BUILTIN = 38;
15+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+38;
1516
#define BUILTIN_LED LED_BUILTIN // backward compatibility
1617
#define LED_BUILTIN LED_BUILTIN
1718
#define RGB_BUILTIN LED_BUILTIN
1819
#define RGB_BRIGHTNESS 64
1920

20-
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
21+
#define analogInputToDigitalPin(p) (((p)<18)?(analogChannelToDigitalPin(p)):-1)
2122
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
2223
#define digitalPinHasPWM(p) (p < 46)
2324

0 commit comments

Comments
 (0)