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.
This commit is contained in:
parent
7b4d468901
commit
cc477a5979
1 changed files with 3 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#define Pins_Arduino_h
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#define USB_VID 0x303a
|
#define USB_VID 0x303a
|
||||||
#define USB_PID 0x1001
|
#define USB_PID 0x1001
|
||||||
|
|
@ -11,13 +12,13 @@
|
||||||
#define NUM_ANALOG_INPUTS 18
|
#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 BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||||
#define LED_BUILTIN LED_BUILTIN
|
#define LED_BUILTIN LED_BUILTIN
|
||||||
#define RGB_BUILTIN LED_BUILTIN
|
#define RGB_BUILTIN LED_BUILTIN
|
||||||
#define RGB_BRIGHTNESS 64
|
#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 digitalPinToInterrupt(p) (((p)<48)?(p):-1)
|
||||||
#define digitalPinHasPWM(p) (p < 46)
|
#define digitalPinHasPWM(p) (p < 46)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue