Skip to content

Commit

Permalink
Update pins_arduino.h (#8659)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
f-io committed Oct 4, 2023
1 parent 7b4d468 commit cc477a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions variants/lolin_s3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

#define USB_VID 0x303a
#define USB_PID 0x1001
Expand All @@ -11,13 +12,13 @@
#define NUM_ANALOG_INPUTS 18


static const uint8_t LED_BUILTIN = 38;
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+38;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64

#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define analogInputToDigitalPin(p) (((p)<18)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46)

Expand Down

0 comments on commit cc477a5

Please sign in to comment.