From 0d0a8c8141bcb16831b16d700a04d961436d4002 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 17 Oct 2024 10:33:10 +0200 Subject: [PATCH 1/3] Eliminate Nano 33 IoT as CI build target. --- .github/workflows/compile-examples.yml | 3 - .../AT24MAC402-Read-MAC.ino | 77 ------------------- 2 files changed, 80 deletions(-) delete mode 100644 examples/tools/AT24MAC402-Read-MAC/AT24MAC402-Read-MAC.ino diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 2d2b7ed..46f88df 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -27,9 +27,6 @@ jobs: matrix: board: - - fqbn: arduino:samd:nano_33_iot - platforms: | - - name: arduino:samd - fqbn: arduino:samd:arduino_zero_native platforms: | - name: arduino:samd diff --git a/examples/tools/AT24MAC402-Read-MAC/AT24MAC402-Read-MAC.ino b/examples/tools/AT24MAC402-Read-MAC/AT24MAC402-Read-MAC.ino deleted file mode 100644 index 5febd3f..0000000 --- a/examples/tools/AT24MAC402-Read-MAC/AT24MAC402-Read-MAC.ino +++ /dev/null @@ -1,77 +0,0 @@ -/* - * This example has been tested with Arduino Nano 33 IoT and with - * Mikroe Two-Wire ETH Click board (MicroChip LAN8651). - * - * arduino-cli compile -b arduino:samd:nano_33_iot -v examples/tools/AT24MAC402-Read-MAC -u -p /dev/ttyACM0 - * - * Author: - * Alexander Entinger - */ - -/************************************************************************************** - * INCLUDE - **************************************************************************************/ - -#include - -#include - -/************************************************************************************** - * SETUP/LOOP - **************************************************************************************/ - -void setup() -{ - Serial.begin(115200); - while (!Serial) { } - delay(1000); - - /* I2C (Wire) is needed to obtain an individual MAC - * address from the AT24MAC402 EEPROM located on the - * Mikroe Two-Wire ETH click board. - */ - Wire.begin(); - - /* Obtain MAC address stored on EEPROM of Mikroe - * Two-Wire ETH Click board. - */ - MacAddress mac_addr; - if (!get_mac_address(mac_addr.data())) { - Serial.println("'get_mac_address(...)' failed."); - for(;;) { } - } - - Serial.print("AT24MAC402 MAC address: "); - Serial.println(mac_addr); -} - -void loop() { - -} - -static bool get_mac_address(uint8_t * p_mac) -{ - static uint8_t const MAC_EEPROM_I2C_SLAVE_ADDR = 0x58; - static uint8_t const MAC_EEPROM_EUI_REG_ADDR = 0x9A; - static uint8_t const MAC_EEPROM_MAC_SIZE = 6; - bool success = false; - - Wire.beginTransmission(MAC_EEPROM_I2C_SLAVE_ADDR); - Wire.write(MAC_EEPROM_EUI_REG_ADDR); - Wire.endTransmission(); - - Wire.requestFrom(MAC_EEPROM_I2C_SLAVE_ADDR, MAC_EEPROM_MAC_SIZE); - - uint32_t const start = millis(); - - size_t bytes_read = 0; - while (bytes_read < MAC_EEPROM_MAC_SIZE && ((millis() - start) < 1000)) { - if (Wire.available()) { - p_mac[bytes_read] = Wire.read(); - bytes_read++; - } - } - - success = (bytes_read == MAC_EEPROM_MAC_SIZE); - return success; -} From b669ae083cfb8af0d95a1a1269bf1f5e7cca858f Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 17 Oct 2024 10:34:08 +0200 Subject: [PATCH 2/3] Remove mentioning of Nano 33 IoT in examples and README. The Nano 33 IoT was only used at the very beginning of the development of this library. --- README.md | 2 +- examples/iperf-client/README.md | 4 ++-- examples/iperf-client/iperf-client.ino | 4 +--- examples/tools/Generate-MAC/Generate-MAC.ino | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 082d6fc..17a5a6f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Sync Labels status](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/sync-labels.yml) [![Arduino Lint](https://github.com/bcmi-labs/Arduino_10BASE_T1S/workflows/Arduino%20Lint/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions?workflow=Arduino+Lint) -**Note**: This library works for Arduino [Nano 33 IoT](https://store.arduino.cc/products/arduino-nano-33-iot), Arduino [Zero](https://store.arduino.cc/products/arduino-zero), Arduino [R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) and Arduino [R4 Minima](https://store.arduino.cc/products/uno-r4-minima). +**Note**: This library works for Arduino [Zero](https://store.arduino.cc/products/arduino-zero), Arduino [R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) and Arduino [R4 Minima](https://store.arduino.cc/products/uno-r4-minima). ### How-to-compile/upload ```bash diff --git a/examples/iperf-client/README.md b/examples/iperf-client/README.md index cde80d7..d274683 100644 --- a/examples/iperf-client/README.md +++ b/examples/iperf-client/README.md @@ -1,11 +1,11 @@ :floppy_disk: `iperf-client` ============================= -This example sketch can be used to measure 10BASE-T1S network performance using this software stack. The required hardware is a Arduino [Nano 33 IoT](https://store.arduino.cc/products/arduino-nano-33-iot) and a Mikroe [2-Wire ETH](https://www.mikroe.com/two-wire-eth-click) click board. +This example sketch can be used to measure 10BASE-T1S network performance using this software stack. ### How-to-compile/upload ```bash -arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/iperf-client -u -p /dev/ttyACM0 +arduino-cli compile -b arduino:renesas_uno:minima -v examples/iperf-client -u -p /dev/ttyACM0 ``` ### How-to-`iperf` diff --git a/examples/iperf-client/iperf-client.ino b/examples/iperf-client/iperf-client.ino index 086d700..4b0ea51 100644 --- a/examples/iperf-client/iperf-client.ino +++ b/examples/iperf-client/iperf-client.ino @@ -1,7 +1,5 @@ /* - * This example has been tested with Arduino Nano 33 IoT and with - * Mikroe Two-Wire ETH Click board (MicroChip LAN8651). For further - * information take a look at the README. + * This example has been tested with the Arduino 10BASE-T1S (T1TOS) shield. * * Author: * Alexander Entinger diff --git a/examples/tools/Generate-MAC/Generate-MAC.ino b/examples/tools/Generate-MAC/Generate-MAC.ino index e3d08c9..39a2c8d 100644 --- a/examples/tools/Generate-MAC/Generate-MAC.ino +++ b/examples/tools/Generate-MAC/Generate-MAC.ino @@ -1,6 +1,5 @@ /* - * This example has been tested with Arduino Uno WiFi R4 and Arduino Nano 33 IoT. - * - arduino-cli compile -b arduino:samd:nano_33_iot -v examples/tools/Generate-MAC -u -p /dev/ttyACM0 + * This example has been tested with Arduino Uno Minima / WiFi R4. * - arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/tools/Generate-MAC -u -p /dev/ttyACM0 * - arduino-cli compile -b arduino:renesas_uno:minima -v examples/tools/Generate-MAC -u -p /dev/ttyACM0 */ From 901803b4d756e4534fbab371e7db499408e0b1e5 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 17 Oct 2024 10:38:06 +0200 Subject: [PATCH 3/3] Eliminate pin definitions for Nano 33 IoT. --- src/Arduino_10BASE_T1S.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Arduino_10BASE_T1S.h b/src/Arduino_10BASE_T1S.h index 8f1d1a3..d6b59dc 100644 --- a/src/Arduino_10BASE_T1S.h +++ b/src/Arduino_10BASE_T1S.h @@ -31,11 +31,7 @@ * CONSTANTS **************************************************************************************/ -#if defined(ARDUINO_SAMD_NANO_33_IOT) -static int const CS_PIN = 10; -static int const RESET_PIN = 9; -static int const IRQ_PIN = 2; -#elif defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_MINIMA) || defined(ARDUINO_UNOWIFIR4) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_GIGA) +#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_MINIMA) || defined(ARDUINO_UNOWIFIR4) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_GIGA) /* Those are all boards with the Arduino Uno form factor for the T1S shield. */ static int const CS_PIN = 9; static int const RESET_PIN = 4;