Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
f42cba9a
Unverified
Commit
f42cba9a
authored
May 03, 2023
by
Me No Dev
Committed by
GitHub
May 03, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into release/v2.x
parents
d3254f75
758b4ebf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
23 deletions
+58
-23
.github/ISSUE_TEMPLATE/Issue-report.yml
.github/ISSUE_TEMPLATE/Issue-report.yml
+1
-0
.github/workflows/lib.json
.github/workflows/lib.json
+14
-3
cores/esp32/WString.h
cores/esp32/WString.h
+2
-2
cores/esp32/esp32-hal-ledc.c
cores/esp32/esp32-hal-ledc.c
+22
-16
libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino
...ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino
+2
-2
libraries/WiFi/src/WiFiSTA.cpp
libraries/WiFi/src/WiFiSTA.cpp
+16
-0
libraries/WiFi/src/WiFiSTA.h
libraries/WiFi/src/WiFiSTA.h
+1
-0
No files found.
.github/ISSUE_TEMPLATE/Issue-report.yml
View file @
f42cba9a
...
@@ -41,6 +41,7 @@ body:
...
@@ -41,6 +41,7 @@ body:
options
:
options
:
-
latest master (checkout manually)
-
latest master (checkout manually)
-
latest development Release Candidate (RC-X)
-
latest development Release Candidate (RC-X)
-
v2.0.8
-
v2.0.7
-
v2.0.7
-
v2.0.6
-
v2.0.6
-
v2.0.5
-
v2.0.5
...
...
.github/workflows/lib.json
View file @
f42cba9a
...
@@ -19,9 +19,6 @@
...
@@ -19,9 +19,6 @@
"name"
:
"ESP32Servo"
,
"name"
:
"ESP32Servo"
,
"exclude_targets"
:
[],
"exclude_targets"
:
[],
"sketch_path"
:
[
"sketch_path"
:
[
"~/Arduino/libraries/ESP32Servo/examples/Knob/Knob.ino"
,
"~/Arduino/libraries/ESP32Servo/examples/Sweep/Sweep.ino"
,
"~/Arduino/libraries/ESP32Servo/examples/PWMExample/PWMExample.ino"
,
"~/Arduino/libraries/ESP32Servo/examples/Multiple-Servo-Example-Arduino/Multiple-Servo-Example-Arduino.ino"
"~/Arduino/libraries/ESP32Servo/examples/Multiple-Servo-Example-Arduino/Multiple-Servo-Example-Arduino.ino"
]
]
},
},
...
@@ -51,5 +48,19 @@
...
@@ -51,5 +48,19 @@
"sketch_path"
:
[
"sketch_path"
:
[
"~/Arduino/libraries/IRremote/examples/SendDemo/SendDemo.ino"
"~/Arduino/libraries/IRremote/examples/SendDemo/SendDemo.ino"
]
]
},
{
"name"
:
"MFRC522"
,
"exclude_targets"
:
[],
"sketch_path"
:
[
"~/Arduino/libraries/MFRC522/examples/ReadUidMultiReader/ReadUidMultiReader.ino"
]
},
{
"name"
:
"WS2812FX"
,
"exclude_targets"
:
[],
"sketch_path"
:
[
"~/Arduino/libraries/WS2812FX/examples/ws2812fx_spi/ws2812fx_spi.ino"
]
}
}
]
]
\ No newline at end of file
cores/esp32/WString.h
View file @
f42cba9a
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
// A pure abstract class forward used as a means to proide a unique pointer type
// A pure abstract class forward used as a means to proide a unique pointer type
// but really is never defined.
// but really is never defined.
class
__FlashStringHelper
;
class
__FlashStringHelper
;
#define FPSTR(pstr_pointer) (
pstr_pointer
)
#define FPSTR(pstr_pointer) (
reinterpret_cast<const __FlashStringHelper *>(pstr_pointer)
)
#define F(string_literal) (
string_literal
)
#define F(string_literal) (
FPSTR(PSTR(string_literal))
)
// An inherited class for holding the result of a concatenation. These
// An inherited class for holding the result of a concatenation. These
// result objects are assumed to be writable by subsequent concatenations.
// result objects are assumed to be writable by subsequent concatenations.
...
...
cores/esp32/esp32-hal-ledc.c
View file @
f42cba9a
...
@@ -215,26 +215,32 @@ static int cnt_channel = LEDC_CHANNELS;
...
@@ -215,26 +215,32 @@ static int cnt_channel = LEDC_CHANNELS;
static
uint8_t
analog_resolution
=
8
;
static
uint8_t
analog_resolution
=
8
;
static
int
analog_frequency
=
1000
;
static
int
analog_frequency
=
1000
;
void
analogWrite
(
uint8_t
pin
,
int
value
)
{
void
analogWrite
(
uint8_t
pin
,
int
value
)
{
// Use ledc hardware for internal pins
// Use ledc hardware for internal pins
if
(
pin
<
SOC_GPIO_PIN_COUNT
)
{
if
(
pin
<
SOC_GPIO_PIN_COUNT
)
{
if
(
pin_to_channel
[
pin
]
==
0
)
{
int8_t
channel
=
-
1
;
if
(
!
cnt_channel
)
{
if
(
pin_to_channel
[
pin
]
==
0
)
{
log_e
(
"No more analogWrite channels available! You can have maximum %u"
,
LEDC_CHANNELS
);
if
(
!
cnt_channel
)
{
return
;
log_e
(
"No more analogWrite channels available! You can have maximum %u"
,
LEDC_CHANNELS
);
}
return
;
if
(
ledcSetup
(
cnt_channel
-
1
,
analog_frequency
,
analog_resolution
)
==
0
){
}
log_e
(
"analogWrite setup failed (freq = %u, resolution = %u). Try setting different resolution or frequency"
);
cnt_channel
--
;
return
;
channel
=
cnt_channel
;
}
}
else
{
ledcAttachPin
(
pin
,
cnt_channel
-
1
);
channel
=
analogGetChannel
(
pin
);
pin_to_channel
[
pin
]
=
cnt_channel
--
;
}
log_v
(
"GPIO %d - Using Channel %d, Value = %d"
,
pin
,
channel
,
value
);
if
(
ledcSetup
(
channel
,
analog_frequency
,
analog_resolution
)
==
0
){
log_e
(
"analogWrite setup failed (freq = %u, resolution = %u). Try setting different resolution or frequency"
);
return
;
}
ledcAttachPin
(
pin
,
channel
);
pin_to_channel
[
pin
]
=
channel
;
ledcWrite
(
channel
,
value
);
}
}
ledcWrite
(
pin_to_channel
[
pin
]
-
1
,
value
);
}
}
}
int8_t
analogGetChannel
(
uint8_t
pin
)
{
int8_t
analogGetChannel
(
uint8_t
pin
)
{
return
pin_to_channel
[
pin
]
-
1
;
return
pin_to_channel
[
pin
];
}
}
void
analogWriteFrequency
(
uint32_t
freq
)
{
void
analogWriteFrequency
(
uint32_t
freq
)
{
...
...
libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino
View file @
f42cba9a
...
@@ -60,8 +60,8 @@ void setup() {
...
@@ -60,8 +60,8 @@ void setup() {
config
.
pin_pclk
=
PCLK_GPIO_NUM
;
config
.
pin_pclk
=
PCLK_GPIO_NUM
;
config
.
pin_vsync
=
VSYNC_GPIO_NUM
;
config
.
pin_vsync
=
VSYNC_GPIO_NUM
;
config
.
pin_href
=
HREF_GPIO_NUM
;
config
.
pin_href
=
HREF_GPIO_NUM
;
config
.
pin_s
s
cb_sda
=
SIOD_GPIO_NUM
;
config
.
pin_s
c
cb_sda
=
SIOD_GPIO_NUM
;
config
.
pin_s
s
cb_scl
=
SIOC_GPIO_NUM
;
config
.
pin_s
c
cb_scl
=
SIOC_GPIO_NUM
;
config
.
pin_pwdn
=
PWDN_GPIO_NUM
;
config
.
pin_pwdn
=
PWDN_GPIO_NUM
;
config
.
pin_reset
=
RESET_GPIO_NUM
;
config
.
pin_reset
=
RESET_GPIO_NUM
;
config
.
xclk_freq_hz
=
20000000
;
config
.
xclk_freq_hz
=
20000000
;
...
...
libraries/WiFi/src/WiFiSTA.cpp
View file @
f42cba9a
...
@@ -366,6 +366,22 @@ bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
...
@@ -366,6 +366,22 @@ bool WiFiSTAClass::disconnect(bool wifioff, bool eraseap)
return
false
;
return
false
;
}
}
/**
* @brief Reset WiFi settings in NVS to default values.
* @return true if erase succeeded
* @note: Resets SSID, password, protocol, mode, etc.
* These settings are maintained by WiFi driver in IDF.
* WiFi driver must be initialized.
*/
bool
WiFiSTAClass
::
eraseAP
(
void
)
{
if
(
WiFi
.
getMode
()
==
WIFI_MODE_NULL
)
{
if
(
!
WiFi
.
enableSTA
(
true
))
return
false
;
}
return
esp_wifi_restore
()
==
ESP_OK
;
}
/**
/**
* Change IP configuration settings disabling the dhcp client
* Change IP configuration settings disabling the dhcp client
* @param local_ip Static ip configuration
* @param local_ip Static ip configuration
...
...
libraries/WiFi/src/WiFiSTA.h
View file @
f42cba9a
...
@@ -53,6 +53,7 @@ public:
...
@@ -53,6 +53,7 @@ public:
bool
reconnect
();
bool
reconnect
();
bool
disconnect
(
bool
wifioff
=
false
,
bool
eraseap
=
false
);
bool
disconnect
(
bool
wifioff
=
false
,
bool
eraseap
=
false
);
bool
eraseAP
(
void
);
bool
isConnected
();
bool
isConnected
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment