Unverified Commit cc477a59 authored by Fio's avatar Fio Committed by GitHub

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.
parent 7b4d4689
......@@ -2,6 +2,7 @@
#define Pins_Arduino_h
#include <stdint.h>
#include "soc/soc_caps.h"
#define USB_VID 0x303a
#define USB_PID 0x1001
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment