Skip to content

Commit 5702b9e

Browse files
Merge branch 'arduino-libraries:master' into master
2 parents b9dec89 + 78aeaf5 commit 5702b9e

8 files changed

+36
-29
lines changed

.github/workflows/check-arduino.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Arduino Lint
2222
uses: arduino/arduino-lint-action@v1

.github/workflows/compile-examples.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,75 @@ jobs:
3434
- fqbn: arduino:avr:nano
3535
platforms: |
3636
- name: arduino:avr
37+
artifact-name-suffix: arduino-avr-nano
3738
- fqbn: arduino:avr:mega
3839
platforms: |
3940
- name: arduino:avr
41+
artifact-name-suffix: arduino-avr-mega
4042
- fqbn: arduino:avr:leonardo
4143
platforms: |
4244
- name: arduino:avr
45+
artifact-name-suffix: arduino-avr-leonardo
4346
- fqbn: arduino:megaavr:uno2018
4447
platforms: |
4548
- name: arduino:megaavr
49+
artifact-name-suffix: arduino-megaavr-uno2018
4650
- fqbn: arduino:megaavr:nona4809
4751
platforms: |
4852
- name: arduino:megaavr
53+
artifact-name-suffix: arduino-megaavr-nona4809
4954
- fqbn: arduino:sam:arduino_due_x_dbg
5055
platforms: |
5156
- name: arduino:sam
57+
artifact-name-suffix: arduino-sam-arduino_due_x_dbg
5258
- fqbn: arduino:samd:arduino_zero_edbg
5359
platforms: |
5460
- name: arduino:samd
61+
artifact-name-suffix: arduino-samd-arduino_zero_edbg
5562
- fqbn: arduino:samd:mkr1000
5663
platforms: |
5764
- name: arduino:samd
65+
artifact-name-suffix: arduino-samd-mkr1000
5866
- fqbn: arduino:samd:mkrzero
5967
platforms: |
6068
- name: arduino:samd
69+
artifact-name-suffix: arduino-samd-mkrzero
6170
- fqbn: arduino:samd:mkrwifi1010
6271
platforms: |
6372
- name: arduino:samd
73+
artifact-name-suffix: arduino-samd-mkrwifi100
6474
- fqbn: arduino:samd:mkrfox1200
6575
platforms: |
6676
- name: arduino:samd
77+
artifact-name-suffix: arduino-samd-mkr1200
6778
- fqbn: arduino:samd:mkrwan1300
6879
platforms: |
6980
- name: arduino:samd
81+
artifact-name-suffix: arduino-samd-mkrwan1300
7082
- fqbn: arduino:samd:mkrwan1310
7183
platforms: |
7284
- name: arduino:samd
85+
artifact-name-suffix: arduino-samd-mkrwan1310
7386
- fqbn: arduino:samd:mkrgsm1400
7487
platforms: |
7588
- name: arduino:samd
89+
artifact-name-suffix: arduino-samd-mkrgsm1400
7690
- fqbn: arduino:samd:mkrnb1500
7791
platforms: |
7892
- name: arduino:samd
93+
artifact-name-suffix: arduino-samd-mkrnb1500
7994
- fqbn: arduino:samd:mkrvidor4000
8095
platforms: |
8196
- name: arduino:samd
97+
artifact-name-suffix: arduino-samd-mkrvidor4000
8298
- fqbn: arduino:samd:nano_33_iot
8399
platforms: |
84100
- name: arduino:samd
101+
artifact-name-suffix: arduino-samd-nano_33_iot
85102

86103
steps:
87104
- name: Checkout repository
88-
uses: actions/checkout@v3
105+
uses: actions/checkout@v4
89106

90107
- name: Compile examples
91108
uses: arduino/compile-sketches@v1
@@ -104,8 +121,8 @@ jobs:
104121
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
105122

106123
- name: Save sketches report as workflow artifact
107-
uses: actions/upload-artifact@v3
124+
uses: actions/upload-artifact@v4
108125
with:
109126
if-no-files-found: error
110127
path: ${{ env.SKETCHES_REPORTS_PATH }}
111-
name: ${{ env.SKETCHES_REPORTS_PATH }}
128+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}

.github/workflows/report-size-deltas.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
- name: Comment size deltas reports to PRs
2121
uses: arduino/report-size-deltas@v1
2222
with:
23-
# The name of the workflow artifact created by the sketch compilation workflow
24-
sketches-reports-source: sketches-reports
23+
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
24+
sketches-reports-source: ^sketches-report-.+

.github/workflows/spell-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Spell check
2222
uses: codespell-project/actions-codespell@master

.github/workflows/sync-labels.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131

3232
- name: Download JSON schema for labels configuration file
3333
id: download-schema
@@ -70,7 +70,7 @@ jobs:
7070
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
7171

7272
- name: Pass configuration files to next job via workflow artifact
73-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
7474
with:
7575
path: |
7676
*.yaml
@@ -105,16 +105,16 @@ jobs:
105105
echo "::set-output name=flag::--dry-run"
106106
107107
- name: Checkout repository
108-
uses: actions/checkout@v3
108+
uses: actions/checkout@v4
109109

110110
- name: Download configuration files artifact
111-
uses: actions/download-artifact@v3
111+
uses: actions/download-artifact@v4
112112
with:
113113
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
114114
path: ${{ env.CONFIGURATIONS_FOLDER }}
115115

116116
- name: Remove unneeded artifact
117-
uses: geekyeggo/delete-artifact@v2
117+
uses: geekyeggo/delete-artifact@v5
118118
with:
119119
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
120120

docs/readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This library is designed to work with the Arduino Ethernet Shield, Arduino Ether
44

55
The Arduino board communicates with the shield using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used as SS. On the Mega, the hardware SS pin, 53, is not used to select the Ethernet controller chip, but it must be kept as an output or the SPI interface won't work.
66

7-
![Arduino UNO Pin map.](./arduino_uno_ethernet_pins.png)
7+
![Arduino UNO Pin map.](https://raw.githubusercontent.com/arduino-libraries/Ethernet/master/docs/arduino_uno_ethernet_pins.png)
88

9-
![Arduino MEGA Pin map.](./arduino_mega_ethernet_pins.png)
9+
![Arduino MEGA Pin map.](https://raw.githubusercontent.com/arduino-libraries/Ethernet/master/docs/arduino_mega_ethernet_pins.png)
1010

1111
To use this library
1212

1313
```
1414
#include <SPI.h>
1515
#include <Ethernet.h>
16-
```
16+
```

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Ethernet
2-
version=2.0.1
2+
version=2.0.2
33
author=Various (see AUTHORS file for details)
44
maintainer=Arduino <[email protected]>
55
sentence=Enables network connection (local and Internet) using the Arduino Ethernet Board or Shield.

src/Ethernet.cpp

+3-13
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,9 @@ void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress g
8383
if (W5100.init() == 0) return;
8484
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
8585
W5100.setMACAddress(mac);
86-
#ifdef ESP8266
87-
W5100.setIPAddress(&ip[0]);
88-
W5100.setGatewayIp(&gateway[0]);
89-
W5100.setSubnetMask(&subnet[0]);
90-
#elif ARDUINO > 106 || TEENSYDUINO > 121
91-
W5100.setIPAddress(ip._address.bytes);
92-
W5100.setGatewayIp(gateway._address.bytes);
93-
W5100.setSubnetMask(subnet._address.bytes);
94-
#else
95-
W5100.setIPAddress(ip._address);
96-
W5100.setGatewayIp(gateway._address);
97-
W5100.setSubnetMask(subnet._address);
98-
#endif
86+
W5100.setIPAddress(ip.raw_address());
87+
W5100.setGatewayIp(gateway.raw_address());
88+
W5100.setSubnetMask(subnet.raw_address());
9989
SPI.endTransaction();
10090
_dnsServerAddress = dns;
10191
}

0 commit comments

Comments
 (0)