Skip to content

Commit 0be8943

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-connected-means-read-and-write
2 parents 3eb7ab1 + c12a6b4 commit 0be8943

File tree

382 files changed

+21734
-17102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+21734
-17102
lines changed

.git-blame-ignore-revs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
9bdcd4f36a2e5285267b69b17e8fc26482dc1c72
2+
eea9999dc5eaf464a432f77d5b65269f9baf198d
3+
98125f88605cd7e46e9be4e1b3ad0600dd5d2b51
4+
19b7a29720a6f2c95d06e2ea4baa335dcf32e68f

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# see https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
2+
# make sure our actions stay up-to-date and we know about any updates.
3+
# most of the time, this happens for major releases.
4+
# (...unless we stop using version tags and switch to hashes...)
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/pull-request.yml

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010

1111

12+
permissions:
13+
contents: read
14+
15+
1216
jobs:
1317

1418
# Run 8 parallel jobs for the default build of all examples.
@@ -22,15 +26,15 @@ jobs:
2226
matrix:
2327
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
2428
steps:
25-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
2630
with:
2731
submodules: true
28-
- uses: actions/setup-python@v2
32+
- uses: actions/setup-python@v4
2933
with:
3034
python-version: '3.x'
3135
- name: Cache Linux toolchain
3236
id: cache-linux
33-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3438
with:
3539
path: ./tools/dist
3640
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
@@ -57,15 +61,15 @@ jobs:
5761
matrix:
5862
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
5963
steps:
60-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v3
6165
with:
6266
submodules: true
63-
- uses: actions/setup-python@v2
67+
- uses: actions/setup-python@v4
6468
with:
6569
python-version: '3.x'
6670
- name: Cache Linux toolchain
6771
id: cache-linux
68-
uses: actions/cache@v2
72+
uses: actions/cache@v3
6973
with:
7074
path: ./tools/dist
7175
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
@@ -85,15 +89,15 @@ jobs:
8589
name: Windows
8690
runs-on: windows-latest
8791
steps:
88-
- uses: actions/checkout@v2
92+
- uses: actions/checkout@v3
8993
with:
9094
submodules: true
91-
- uses: actions/setup-python@v2
95+
- uses: actions/setup-python@v4
9296
with:
9397
python-version: '3.x'
9498
- name: Cache Windows toolchain
9599
id: cache-windows
96-
uses: actions/cache@v2
100+
uses: actions/cache@v3
97101
with:
98102
path: ./tools/dist
99103
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
@@ -120,15 +124,15 @@ jobs:
120124
run:
121125
shell: bash
122126
steps:
123-
- uses: actions/checkout@v2
127+
- uses: actions/checkout@v3
124128
with:
125129
submodules: true
126-
- uses: actions/setup-python@v2
130+
- uses: actions/setup-python@v4
127131
with:
128132
python-version: '3.x'
129133
- name: Cache Mac toolchain
130134
id: cache-mac
131-
uses: actions/cache@v2
135+
uses: actions/cache@v3
132136
with:
133137
path: ./tools/dist
134138
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
@@ -152,10 +156,10 @@ jobs:
152156
run:
153157
shell: bash
154158
steps:
155-
- uses: actions/checkout@v2
159+
- uses: actions/checkout@v3
156160
with:
157161
submodules: true
158-
- uses: actions/setup-python@v2
162+
- uses: actions/setup-python@v4
159163
with:
160164
python-version: '3.x'
161165
- name: Build subset on Platform.IO
@@ -179,10 +183,10 @@ jobs:
179183
run:
180184
shell: bash
181185
steps:
182-
- uses: actions/checkout@v2
186+
- uses: actions/checkout@v3
183187
with:
184188
submodules: true
185-
- uses: actions/setup-python@v2
189+
- uses: actions/setup-python@v4
186190
with:
187191
python-version: '3.x'
188192
- name: Run host tests
@@ -203,10 +207,10 @@ jobs:
203207
run:
204208
shell: bash
205209
steps:
206-
- uses: actions/checkout@v2
210+
- uses: actions/checkout@v3
207211
with:
208212
submodules: true
209-
- uses: actions/setup-python@v2
213+
- uses: actions/setup-python@v4
210214
with:
211215
python-version: '3.x'
212216
- name: Build documentation
@@ -230,19 +234,29 @@ jobs:
230234
run:
231235
shell: bash
232236
steps:
233-
- uses: actions/checkout@v2
237+
- uses: actions/checkout@v3
234238
with:
235239
submodules: true
236-
- uses: actions/setup-python@v2
240+
- uses: actions/setup-python@v4
237241
with:
238242
python-version: '3.x'
239243
- name: Style check
240244
env:
245+
LLVM_SNAPSHOT_KEY: "6084F3CF814B57C1CF12EFD515CF4D18AF4F7421"
241246
TRAVIS_BUILD_DIR: ${{ github.workspace }}
242247
TRAVIS_TAG: ${{ github.ref }}
243248
run: |
249+
export GNUPGHOME=$(mktemp -d)
250+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$LLVM_SNAPSHOT_KEY"
251+
gpg --batch --armor --export "$LLVM_SNAPSHOT_KEY" | \
252+
sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.gpg.asc
253+
gpgconf --kill all
254+
rm -r $GNUPGHOME
255+
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | \
256+
sudo tee /etc/apt/sources.list.d/llvm.list
244257
sudo apt update
245-
sudo apt install astyle
258+
sudo apt install clang-format-13
259+
pip3 install pyyaml
246260
bash ./tests/ci/style_check.sh
247261
248262
@@ -254,10 +268,10 @@ jobs:
254268
run:
255269
shell: bash
256270
steps:
257-
- uses: actions/checkout@v2
271+
- uses: actions/checkout@v3
258272
with:
259273
submodules: true
260-
- uses: actions/setup-python@v2
274+
- uses: actions/setup-python@v4
261275
with:
262276
python-version: '3.x'
263277
- name: Mock build
@@ -276,15 +290,15 @@ jobs:
276290
run:
277291
shell: bash
278292
steps:
279-
- uses: actions/checkout@v2
293+
- uses: actions/checkout@v3
280294
with:
281295
submodules: true
282-
- uses: actions/setup-python@v2
296+
- uses: actions/setup-python@v4
283297
with:
284298
python-version: '3.x'
285299
- name: Cache Linux toolchain
286300
id: cache-linux
287-
uses: actions/cache@v2
301+
uses: actions/cache@v3
288302
with:
289303
path: ./tools/dist
290304
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
@@ -306,7 +320,7 @@ jobs:
306320
run:
307321
shell: bash
308322
steps:
309-
- uses: actions/checkout@v2
323+
- uses: actions/checkout@v3
310324
with:
311325
submodules: true
312326
- name: Run codespell

.github/workflows/release-to-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ on:
2828
release:
2929
types: [published]
3030

31+
permissions:
32+
contents: read
33+
3134
jobs:
3235
package:
3336
name: Update master JSON file
@@ -36,7 +39,7 @@ jobs:
3639
run:
3740
shell: bash
3841
steps:
39-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v3
4043
with:
4144
submodules: false
4245
fetch-depth: 0

.github/workflows/tag-to-draft-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
run:
1919
shell: bash
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
with:
2323
submodules: true
2424
fetch-depth: 0
25-
- uses: actions/setup-python@v2
25+
- uses: actions/setup-python@v4
2626
with:
2727
python-version: '3.x'
2828
- name: Set GIT tag name

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and
2828

2929
Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).
3030

31-
- Install the current upstream Arduino IDE at the 1.8.9 level or later. The current version is on the [Arduino website](https://www.arduino.cc/en/main/software).
31+
- Install the current upstream Arduino IDE at the 1.8.9 level or later. The current version is on the [Arduino website](https://www.arduino.cc/en/software).
3232
- Start Arduino and open the Preferences window.
3333
- Enter ```https://arduino.esp8266.com/stable/package_esp8266com_index.json``` into the *File>Preferences>Additional Boards Manager URLs* field of the Arduino IDE. You can add multiple URLs, separating them with commas.
3434
- Open Boards Manager from Tools > Board menu and install *esp8266* platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
@@ -43,7 +43,7 @@ Documentation: [https://arduino-esp8266.readthedocs.io/en/3.0.2/](https://arduin
4343

4444
Also known as latest git or master branch.
4545

46-
- Install the current upstream Arduino IDE at the 1.8 level or later. The current version is on the [Arduino website](https://www.arduino.cc/en/main/software).
46+
- Install the current upstream Arduino IDE at the 1.8 level or later. The current version is on the [Arduino website](https://www.arduino.cc/en/software).
4747
- Follow the [instructions in the documentation](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version).
4848

4949
### Using PlatformIO

bootloaders/eboot/eboot.elf

92 Bytes
Binary file not shown.

cores/esp8266/Arduino.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,13 @@ long map(long, long, long, long, long);
269269

270270
void setTZ(const char* tz);
271271

272-
void configTime(int timezone, int daylightOffset_sec, const char* server1,
272+
// configure time using POSIX TZ string
273+
// server pointers *must remain valid* for the duration of the program
274+
void configTime(const char* tz, const char* server1,
273275
const char* server2 = nullptr, const char* server3 = nullptr);
274276

275-
void configTime(const char* tz, const char* server1,
277+
// configures with approximated TZ value. part of the old api, prefer configTime with TZ variable
278+
void configTime(int timezone, int daylightOffset_sec, const char* server1,
276279
const char* server2 = nullptr, const char* server3 = nullptr);
277280

278281
// esp32 api compatibility
@@ -290,6 +293,12 @@ bool getLocalTime(struct tm * info, uint32_t ms = 5000);
290293
#include "WCharacter.h"
291294
#include "WString.h"
292295

296+
// configTime wrappers for temporary server{1,2,3} strings
297+
void configTime(int timezone, int daylightOffset_sec, String server1,
298+
String server2 = String(), String server3 = String());
299+
void configTime(const char* tz, String server1,
300+
String server2 = String(), String server3 = String());
301+
293302
#include "HardwareSerial.h"
294303
#include "Esp.h"
295304
#include "Updater.h"

cores/esp8266/FS.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ class File : public Stream
9090
uint8_t obuf[256];
9191
size_t doneLen = 0;
9292
size_t sentLen;
93-
int i;
9493

95-
while (src.available() > sizeof(obuf)){
94+
while (src.available() > (int)sizeof(obuf)){
9695
src.read(obuf, sizeof(obuf));
9796
sentLen = write(obuf, sizeof(obuf));
9897
doneLen = doneLen + sentLen;

cores/esp8266/IPAddress.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class IPAddress: public Printable {
6969
IPAddress(const IPAddress& from);
7070
IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet);
7171
IPAddress(uint32_t address) { ctor32(address); }
72-
IPAddress(u32_t address) { ctor32(address); }
72+
IPAddress(unsigned long address) { ctor32(address); }
7373
IPAddress(int address) { ctor32(address); }
7474
IPAddress(const uint8_t *address);
7575

@@ -80,16 +80,14 @@ class IPAddress: public Printable {
8080
// to a four-byte uint8_t array is expected
8181
operator uint32_t() const { return isV4()? v4(): (uint32_t)0; }
8282
operator uint32_t() { return isV4()? v4(): (uint32_t)0; }
83-
operator u32_t() const { return isV4()? v4(): (u32_t)0; }
84-
operator u32_t() { return isV4()? v4(): (u32_t)0; }
8583

8684
bool isSet () const;
8785
operator bool () const { return isSet(); } // <-
8886
operator bool () { return isSet(); } // <- both are needed
8987

9088
// generic IPv4 wrapper to uint32-view like arduino loves to see it
91-
const u32_t& v4() const { return ip_2_ip4(&_ip)->addr; } // for raw_address(const)
92-
u32_t& v4() { return ip_2_ip4(&_ip)->addr; }
89+
const uint32_t& v4() const { return ip_2_ip4(&_ip)->addr; } // for raw_address(const)
90+
uint32_t& v4() { return ip_2_ip4(&_ip)->addr; }
9391

9492
bool operator==(const IPAddress& addr) const {
9593
return ip_addr_cmp(&_ip, &addr._ip);
@@ -100,14 +98,14 @@ class IPAddress: public Printable {
10098
bool operator==(uint32_t addr) const {
10199
return isV4() && v4() == addr;
102100
}
103-
bool operator==(u32_t addr) const {
104-
return isV4() && v4() == addr;
101+
bool operator==(unsigned long addr) const {
102+
return isV4() && v4() == (uint32_t)addr;
105103
}
106104
bool operator!=(uint32_t addr) const {
107105
return !(isV4() && v4() == addr);
108106
}
109-
bool operator!=(u32_t addr) const {
110-
return !(isV4() && v4() == addr);
107+
bool operator!=(unsigned long addr) const {
108+
return isV4() && v4() != (uint32_t)addr;
111109
}
112110
bool operator==(const uint8_t* addr) const;
113111

0 commit comments

Comments
 (0)