Skip to content

Commit 0a6c354

Browse files
authored
Merge branch 'espressif:master' into speed_OTA
2 parents 45a7a95 + fef932c commit 0a6c354

File tree

29 files changed

+684
-68
lines changed

29 files changed

+684
-68
lines changed

boards.txt

Lines changed: 317 additions & 19 deletions
Large diffs are not rendered by default.

cores/esp32/HardwareSerial.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ void HardwareSerial::setRxInvert(bool invert)
491491
// negative Pin value will keep it unmodified
492492
void HardwareSerial::setPins(int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin)
493493
{
494+
if(_uart == NULL) {
495+
log_e("setPins() shall be called after begin() - nothing done");
496+
return;
497+
}
494498
uartSetPins(_uart, rxPin, txPin, ctsPin, rtsPin);
495499
}
496500

cores/esp32/esp32-hal-gpio.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ static InterruptHandle_t __pinInterruptHandlers[SOC_GPIO_PIN_COUNT] = {0,};
9191

9292
extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode)
9393
{
94-
#ifdef BOARD_HAS_NEOPIXEL
95-
if (pin == LED_BUILTIN){
96-
__pinMode(LED_BUILTIN-SOC_GPIO_PIN_COUNT, mode);
94+
#ifdef RGB_BUILTIN
95+
if (pin == RGB_BUILTIN){
96+
__pinMode(RGB_BUILTIN-SOC_GPIO_PIN_COUNT, mode);
9797
return;
9898
}
9999
#endif
@@ -134,11 +134,11 @@ extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode)
134134

135135
extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val)
136136
{
137-
#ifdef BOARD_HAS_NEOPIXEL
138-
if(pin == LED_BUILTIN){
137+
#ifdef RGB_BUILTIN
138+
if(pin == RGB_BUILTIN){
139139
//use RMT to set all channels on/off
140-
const uint8_t comm_val = val != 0 ? LED_BRIGHTNESS : 0;
141-
neopixelWrite(LED_BUILTIN, comm_val, comm_val, comm_val);
140+
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
141+
neopixelWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
142142
return;
143143
}
144144
#endif

cores/esp32/esp32-hal-i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ esp_err_t i2cInit(uint8_t i2c_num, int8_t sda, int8_t scl, uint32_t frequency){
7272
} else if(frequency > 1000000UL){
7373
frequency = 1000000UL;
7474
}
75+
log_i("Initialising I2C Master: sda=%d scl=%d freq=%d", sda, scl, frequency);
7576

7677
i2c_config_t conf = { };
7778
conf.mode = I2C_MODE_MASTER;

cores/esp32/esp32-hal-ledc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,7 @@ void analogWrite(uint8_t pin, int value) {
226226
ledcWrite(pin_to_channel[pin] - 1, value);
227227
}
228228
}
229+
230+
int8_t analogGetChannel(uint8_t pin) {
231+
return pin_to_channel[pin] - 1;
232+
}

cores/esp32/esp32-hal-rgb-led.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue
77
static bool initialized = false;
88

99
uint8_t _pin = pin;
10-
#ifdef BOARD_HAS_NEOPIXEL
11-
if(pin == LED_BUILTIN){
12-
_pin = LED_BUILTIN-SOC_GPIO_PIN_COUNT;
10+
#ifdef RGB_BUILTIN
11+
if(pin == RGB_BUILTIN){
12+
_pin = RGB_BUILTIN-SOC_GPIO_PIN_COUNT;
1313
}
1414
#endif
1515

cores/esp32/esp32-hal-rgb-led.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ extern "C" {
77

88
#include "esp32-hal.h"
99

10-
#ifndef LED_BRIGHTNESS
11-
#define LED_BRIGHTNESS 64
10+
#ifndef RGB_BRIGHTNESS
11+
#define RGB_BRIGHTNESS 64
1212
#endif
1313

1414
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);

cores/esp32/esp32-hal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void yield(void);
9292
#include "esp32-hal-cpu.h"
9393

9494
void analogWrite(uint8_t pin, int value);
95+
int8_t analogGetChannel(uint8_t pin);
9596

9697
//returns chip temperature in Celsius
9798
float temperatureRead();

docs/source/faq.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
##########################
22
Frequently Asked Questions
33
##########################
4+
5+
How to modify an sdkconfig option in Arduino?
6+
---------------------------------------------
7+
8+
Arduino-esp32 project is based on ESP-IDF. While ESP-IDF supports configuration of various compile-time options (known as "Kconfig options" or "sdkconfig options") via a "menuconfig" tool, this feature is not available in Arduino IDE.
9+
10+
To use the arduino-esp32 core with a modified sdkconfig option, you need to use ESP-IDF to compile Arduino libraries. Please see :doc:`esp-idf_component` and :doc:`lib_builder` for the two solutions available.
11+
12+
Note that modifying ``sdkconfig`` or ``sdkconfig.h`` files found in the arduino-esp32 project tree **does not** result in changes to these options. This is because ESP-IDF libraries are included into the arduino-esp32 project tree as pre-built libraries.
13+

libraries/BLE/src/BLEAdvertisedDevice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <esp_gattc_api.h>
1313

1414
#include <map>
15+
#include <vector>
1516

1617
#include "BLEAddress.h"
1718
#include "BLEScan.h"

0 commit comments

Comments
 (0)