From f72063c7df15fb538fb0e1a6a07182df1e10c855 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 22 Jul 2025 15:55:27 +0200 Subject: [PATCH 01/11] add docs/README.md --- README.md | 101 ++++++++++++++++++++----------------------------- docs/README.md | 60 +++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 60 deletions(-) create mode 100644 docs/README.md diff --git a/README.md b/README.md index e1e3e45..9a21944 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,47 @@ -`Arduino_10BASE_T1S` + Arduino Single Pair Ethernet (10BASE-T1S) Library ==================== [![Compile Examples](https://github.com/bcmi-labs/Arduino_10BASE_T1S/workflows/Compile%20Examples/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions?workflow=Compile+Examples) [![Spell Check status](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/spell-check-task.yml) [![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 [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 -arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0 -``` - -### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A) -**Note**: Keep [this application note](https://microchip.my.site.com/s/article/EVB-LAN8670-USB-Enablement-for-Debian-Ubuntu-Raspbian) in mind when building for Debian based systems. You may need to revert back to legacy network configuration tools. - -* Disconnect `EVB-LAN8670-USB`, if it is already connected. -* Build kernel driver: -```bash -cd extras/evb-lan8670-usb-linux-6.1.21 -make -``` -* Load kernel driver: -```bash -sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32 -``` -* `dmesg` output when connecting the USB dongle: -```bash -[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00 -[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 -[ +0,000006] usb 1-2.3: Product: 10BASE-T1S -[ +0,000005] usb 1-2.3: Manufacturer: MCHP -[ +0,000005] usb 1-2.3: SerialNumber: 0000465 -[ +0,004338] smsc95xx v2.0.0 -[ +0,582091] LAN867X Rev.B1 usb-001:025:00: PLCA mode enabled. Node Id: 0, Node Count: 8, Max BC: 0, Burst Timer: 128, TO Timer: 32 -[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190) -[ +0,000285] smsc95xx 1-2.3:1.0 eth2: register 'smsc95xx' at usb-0000:00:14.0-2.3, smsc95xx USB 2.0 Ethernet, 00:1e:c0:d1:b9:4b -``` -* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output). -```bash -sudo ip addr add dev eth1 192.168.42.100/24 -``` -* You can take a look at the registered Ethernet device via `ip link show eth1`: -```bash -3: eth1: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 - link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff - inet 192.168.42.100/24 scope global eth1 - valid_lft forever preferred_lft forever -``` -* Bring `eth1` interface up via `sudo ifconfig eth1 up`. -* Verify `eth1` via `ifconfig eth1`: -```bash -eth1: flags=4099 mtu 1500 - inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0 - ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet) - RX packets 0 bytes 0 (0.0 B) - RX errors 0 dropped 0 overruns 0 frame 0 - TX packets 0 bytes 0 (0.0 B) - TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 -``` - -### How-to-`tcpdump` -```bash -tcpdump -i eth1 -``` +This library implements the **10BASE-T1S** standard (Single Pair Ethernet) for selected Arduino boards. + +It enables low-speed Ethernet connectivity over a single twisted pair, ideal for industrial and automotive applications. + +### What is 10BASE-T1S? +10BASE‑T1S is an Ethernet physical layer standard defined by IEEE (part of IEEE 802.3cg) that enables Ethernet communication over a single twisted pair cable at speeds up to 10 Mbps. + +## 📖 Documentation +For more information on the features of this library and how to use them please read the documentation [here](./docs/). + +## ✅ Supported Boards + +This library was tested and validated on the following Arduino boards: +- [Arduino Zero](https://store.arduino.cc/products/arduino-zero) +- [Arduino UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) +- [Arduino UNO R4 Minima](https://store.arduino.cc/products/uno-r4-minima) + +> [!IMPORTANT] +> These boards do not include a native 10BASE‑T1S PHY or transceiver. +To enable Single Pair Ethernet communication, you must connect an external and compatible 10BASE‑T1S transceiver to your board via SPI. + +> [!NOTE] +> The library may work on other boards, but they are not officially supported. + +## 📕 Further Reading +- [Arduino UNO SPE Shield](https://docs.arduino.cc/hardware/spe-shield/) + +## 🐛 Reporting Issues + +If you encounter any issue, please open a bug report [here](https://github.com/arduino-libraries/Arduino_10BASE_T1S/issues). + +## 🫂 Contributing + +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +For questions, comments, or feedback on this library, please create an issue on this repository. + +## ⚖️ License + +This library is released under the [MPL-2.0 license](http://mozilla.org/MPL/2.0/). \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..5b96d0b --- /dev/null +++ b/docs/README.md @@ -0,0 +1,60 @@ +📖 Arduino Single Pair Ethernet Library - Documentation +==================== + +### How-to-compile/upload +```bash +arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0 +``` + +### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A) +**Note**: Keep [this application note](https://microchip.my.site.com/s/article/EVB-LAN8670-USB-Enablement-for-Debian-Ubuntu-Raspbian) in mind when building for Debian based systems. You may need to revert back to legacy network configuration tools. + +* Disconnect `EVB-LAN8670-USB`, if it is already connected. +* Build kernel driver: +```bash +cd extras/evb-lan8670-usb-linux-6.1.21 +make +``` +* Load kernel driver: +```bash +sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32 +``` +* `dmesg` output when connecting the USB dongle: +```bash +[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00 +[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +[ +0,000006] usb 1-2.3: Product: 10BASE-T1S +[ +0,000005] usb 1-2.3: Manufacturer: MCHP +[ +0,000005] usb 1-2.3: SerialNumber: 0000465 +[ +0,004338] smsc95xx v2.0.0 +[ +0,582091] LAN867X Rev.B1 usb-001:025:00: PLCA mode enabled. Node Id: 0, Node Count: 8, Max BC: 0, Burst Timer: 128, TO Timer: 32 +[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190) +[ +0,000285] smsc95xx 1-2.3:1.0 eth2: register 'smsc95xx' at usb-0000:00:14.0-2.3, smsc95xx USB 2.0 Ethernet, 00:1e:c0:d1:b9:4b +``` +* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output). +```bash +sudo ip addr add dev eth1 192.168.42.100/24 +``` +* You can take a look at the registered Ethernet device via `ip link show eth1`: +```bash +3: eth1: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000 + link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff + inet 192.168.42.100/24 scope global eth1 + valid_lft forever preferred_lft forever +``` +* Bring `eth1` interface up via `sudo ifconfig eth1 up`. +* Verify `eth1` via `ifconfig eth1`: +```bash +eth1: flags=4099 mtu 1500 + inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0 + ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet) + RX packets 0 bytes 0 (0.0 B) + RX errors 0 dropped 0 overruns 0 frame 0 + TX packets 0 bytes 0 (0.0 B) + TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 +``` + +### How-to-`tcpdump` +```bash +tcpdump -i eth1 +``` \ No newline at end of file From f529993bea0916c144b01f78dfe0921ac467c11c Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 22 Jul 2025 16:08:15 +0200 Subject: [PATCH 02/11] add keywords.txt --- keywords.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 keywords.txt diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 0000000..57cb79d --- /dev/null +++ b/keywords.txt @@ -0,0 +1,25 @@ +####################################### +# Syntax Coloring Map +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +####################################### +# Methods and Functions (KEYWORD2) +####################################### +beginPacket KEYWORD2 +endPacket KEYWORD2 +write KEYWORD2 +parsePacket KEYWORD2 +available KEYWORD2 +read KEYWORD2 +peek KEYWORD2 +flush KEYWORD2 +remoteIP KEYWORD2 +remotePort KEYWORD2 + +###################################### +# Constants (LITERAL1) +####################################### \ No newline at end of file From 5734b1d14296e6540e64461f52bb87333c3276b9 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 22 Jul 2025 17:02:23 +0200 Subject: [PATCH 03/11] add render-documentation workflow --- .github/workflows/render-documentation.yml | 28 ++++ src/Arduino_10BASE_T1S_PHY_Interface.h | 13 ++ src/Arduino_10BASE_T1S_UDP.h | 144 ++++++++++++++++++++- src/microchip/TC6_Arduino_10BASE_T1S.h | 48 ++++++- 4 files changed, 229 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/render-documentation.yml diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml new file mode 100644 index 0000000..992d116 --- /dev/null +++ b/.github/workflows/render-documentation.yml @@ -0,0 +1,28 @@ +name: Render Documentation + +on: + push: + branches: + - main + paths: + - ".github/workflows/render-documentation.ya?ml" + - "examples/**" + - "src/**" + pull_request: + branches: + - main + paths: + - ".github/workflows/render-documentation.ya?ml" + - "examples/**" + - "src/**" + workflow_dispatch: + +jobs: + render-docs: + permissions: + contents: write + uses: arduino/render-docs-github-action/.github/workflows/render-docs.yml@main + with: + source-path: './src' + target-path: './docs/api.md' + fail-on-warnings: false \ No newline at end of file diff --git a/src/Arduino_10BASE_T1S_PHY_Interface.h b/src/Arduino_10BASE_T1S_PHY_Interface.h index 17dcc1b..c6a7b37 100644 --- a/src/Arduino_10BASE_T1S_PHY_Interface.h +++ b/src/Arduino_10BASE_T1S_PHY_Interface.h @@ -29,6 +29,19 @@ class Arduino_10BASE_T1S_PHY_Interface public: virtual ~Arduino_10BASE_T1S_PHY_Interface() { } + /** + * @brief Initializes the PHY interface with the specified network settings. + * + * This method configures the PHY interface with the provided IP address, + * network mask, gateway, MAC address, and PLCA settings. + * + * @param ip_addr The IP address to assign to the interface. + * @param network_mask The network mask to use. + * @param gateway The gateway IP address. + * @param mac_addr The MAC address to assign to the interface. + * @param t1s_plca_settings The PLCA settings to use. + * @return Returns true if the initialization was successful, false otherwise. + */ virtual bool begin(IPAddress const ip_addr, IPAddress const network_mask, IPAddress const gateway, diff --git a/src/Arduino_10BASE_T1S_UDP.h b/src/Arduino_10BASE_T1S_UDP.h index 8f96cab..dadef9f 100644 --- a/src/Arduino_10BASE_T1S_UDP.h +++ b/src/Arduino_10BASE_T1S_UDP.h @@ -36,32 +36,174 @@ class Arduino_10BASE_T1S_UDP : public UDP { public: + /** + * @class Arduino_10BASE_T1S_UDP + * @brief UDP communication class for Arduino 10BASE-T1S library. + */ Arduino_10BASE_T1S_UDP(); virtual ~Arduino_10BASE_T1S_UDP(); /* arduino:UDP */ + /** + * @brief Initializes the UDP instance to listen on the specified port. + * + * This method sets up the UDP protocol to begin listening for incoming packets + * on the given port. It should be called before attempting to send or receive + * UDP packets. + * + * @param port The local port to listen on. + * @return Returns 1 if successful, 0 if there was an error. + */ virtual uint8_t begin(uint16_t port) override; + + + /** + * @brief Stops the UDP connection and releases any associated resources. + * + * This method overrides the base class implementation to properly close + * the UDP socket and perform necessary cleanup operations. + */ virtual void stop() override; + /** + * @brief Begins the construction of a UDP packet to the specified IP address and port. + * + * Initializes the UDP packet buffer and prepares it to send data to the given destination. + * + * @param ip The destination IP address. + * @param port The destination port number. + * @return int Returns 1 on success, 0 on failure. + */ virtual int beginPacket(IPAddress ip, uint16_t port) override; + + /** + * @brief Begins the construction of a UDP packet to the specified host and port. + * + * Initializes the UDP packet buffer and prepares it to send data to the given destination. + * + * @param host The destination host name or IP address as a string. + * @param port The destination port number. + * @return int Returns 1 on success, 0 on failure. + */ virtual int beginPacket(const char *host, uint16_t port) override; + + /** + * @brief Finishes the construction of a UDP packet and sends it. + * + * This method finalizes the UDP packet and transmits it to the previously specified + * destination IP address and port. + * + * @return int Returns 1 on success, 0 on failure. + */ virtual int endPacket() override; + + /** + * @brief Sends a single byte of data in the current UDP packet. + * + * This method appends a single byte to the current UDP packet buffer. + * + * @param data The byte of data to send. + * @return size_t Returns the number of bytes written, which is always 1 for a single byte. + */ virtual size_t write(uint8_t data) override; + + /** + * @brief Sends a buffer of data in the current UDP packet. + * + * This method appends a specified number of bytes from the provided buffer to the + * current UDP packet buffer. + * + * @param buffer Pointer to the data buffer to send. + * @param size The number of bytes to write from the buffer. + * @return size_t Returns the number of bytes written, which may be less than size if an error occurs. + */ virtual size_t write(const uint8_t * buffer, size_t size) override; + /** + * @brief Sends a string in the current UDP packet. + * + * This method appends a null-terminated string to the current UDP packet buffer. + * + * @param str Pointer to the null-terminated string to send. + * @return size_t Returns the number of bytes written, including the null terminator. + */ virtual int parsePacket() override; + + /** + * @brief Checks if there are any incoming UDP packets available to read. + * + * This method checks the internal buffer for any received UDP packets. + * + * @return int Returns the number of available bytes in the current packet, or 0 if no packets are available. + */ virtual int available() override; + + /** + * @brief Reads a single byte from the current UDP packet. + * + * This method retrieves the next byte from the current UDP packet buffer. + * + * @return int Returns the byte read, or -1 if no data is available. + */ virtual int read() override; + + /** + * @brief Reads a specified number of bytes from the current UDP packet into a buffer. + * + * This method reads data from the current UDP packet into the provided buffer. + * + * @param buffer Pointer to the buffer where the data will be stored. + * @param len The number of bytes to read into the buffer. + * @return int Returns the number of bytes read, which may be less than len if not enough data is available. + */ virtual int read(unsigned char* buffer, size_t len) override; + + /** + * @brief Reads a specified number of bytes from the current UDP packet into a character buffer. + * + * This method reads data from the current UDP packet into the provided character buffer. + * + * @param buffer Pointer to the character buffer where the data will be stored. + * @param len The number of bytes to read into the buffer. + * @return int Returns the number of bytes read, which may be less than len if not enough data is available. + */ virtual int read(char* buffer, size_t len) override; + + /** + * @brief Peeks at the next byte in the current UDP packet without removing it from the buffer. + * + * This method retrieves the next byte from the current UDP packet buffer without consuming it. + * + * @return int Returns the next byte, or -1 if no data is available. + */ virtual int peek() override; + + /** + * @brief Flushes the current UDP packet buffer. + * + * This method clears the current UDP packet buffer, discarding any unsent data. + */ virtual void flush() override; + /** + * @brief Returns the IP address of the remote host that sent the last received packet. + * + * This method retrieves the IP address of the sender of the last received UDP packet. + * + * @return IPAddress Returns the IP address of the remote host. + */ virtual IPAddress remoteIP() override; + + /** + * @brief Returns the port number of the remote host that sent the last received packet. + * + * This method retrieves the port number of the sender of the last received UDP packet. + * + * @return uint16_t Returns the port number of the remote host. + */ virtual uint16_t remotePort() override; - /* This function MUST not be called from the user of this library, * it's used for internal purposes only. */ diff --git a/src/microchip/TC6_Arduino_10BASE_T1S.h b/src/microchip/TC6_Arduino_10BASE_T1S.h index 08a1bdd..dd7fb5d 100644 --- a/src/microchip/TC6_Arduino_10BASE_T1S.h +++ b/src/microchip/TC6_Arduino_10BASE_T1S.h @@ -74,11 +74,31 @@ enum class DIO { A0, A1 }; class TC6_Arduino_10BASE_T1S : public Arduino_10BASE_T1S_PHY_Interface { public: + /** + * @class TC6_Arduino_10BASE_T1S + * @brief Arduino 10BASE-T1S PHY interface implementation using TC6. + * + * This class provides the implementation of the Arduino_10BASE_T1S_PHY_Interface + * using the TC6 hardware abstraction layer for 10BASE-T1S communication. + */ TC6_Arduino_10BASE_T1S(TC6_Io & tc6_io); virtual ~TC6_Arduino_10BASE_T1S(); - + /** + * @brief Initializes the TC6 Arduino 10BASE-T1S PHY interface with the specified network settings. + * + * This method configures the TC6 interface with the provided IP address, + * network mask, gateway, MAC address, and PLCA settings. + * + * @param ip_addr The IP address to assign to the interface. + * @param network_mask The network mask to use. + * @param gateway The gateway IP address. + * @param mac_addr The MAC address to assign to the interface. + * @param t1s_plca_settings The PLCA settings to use. + * @param t1s_mac_settings The MAC settings to use. + * @return Returns true if the initialization was successful, false otherwise. + */ virtual bool begin(IPAddress const ip_addr, IPAddress const network_mask, IPAddress const gateway, @@ -88,15 +108,37 @@ class TC6_Arduino_10BASE_T1S : public Arduino_10BASE_T1S_PHY_Interface virtual void service() override; - + void digitalWrite(DIO const dio, bool const value); + /** + * @brief Gets the PLCA status. + * + * This method retrieves the current PLCA status from the TC6 hardware. + * + * @param on_plca_status Callback function to handle the PLCA status. + * @return bool Returns true if the PLCA status was successfully retrieved, false otherwise. + */ bool getPlcaStatus(TC6LwIP_On_PlcaStatus on_plca_status); + /** + * @brief Enables PLCA (Physical Layer Collision Avoidance). + * + * This method enables the PLCA functionality on the TC6 hardware. + * + * @return bool Returns true if PLCA was successfully enabled, false otherwise. + */ bool enablePlca(); + /** + * @brief Checks if sending data would block. + * + * This method checks if the TC6 hardware is currently able to send data + * without blocking. + * + * @return bool Returns true if sending data would block, false otherwise. + */ bool sendWouldBlock(); - private: TC6_Io & _tc6_io; TC6LwIP_t _lw; From 81a64c67f84744625036dd0d918fa12e665270bf Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 22 Jul 2025 17:09:08 +0200 Subject: [PATCH 04/11] test render-doc workflow on current branch --- .github/workflows/render-documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml index 992d116..ee75dd7 100644 --- a/.github/workflows/render-documentation.yml +++ b/.github/workflows/render-documentation.yml @@ -3,7 +3,7 @@ name: Render Documentation on: push: branches: - - main + - docs_refactor paths: - ".github/workflows/render-documentation.ya?ml" - "examples/**" From 8c4fbc0806378764c753ccc61e40cbd63e9eaaa9 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 22 Jul 2025 17:18:36 +0200 Subject: [PATCH 05/11] render-doc: test ignore folders --- .github/workflows/render-documentation.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml index ee75dd7..f1b1956 100644 --- a/.github/workflows/render-documentation.yml +++ b/.github/workflows/render-documentation.yml @@ -8,13 +8,17 @@ on: - ".github/workflows/render-documentation.ya?ml" - "examples/**" - "src/**" + - "!src/lib/**" + - "!src/microchip/**" pull_request: branches: - - main + - docs_refactor paths: - ".github/workflows/render-documentation.ya?ml" - "examples/**" - "src/**" + - "!src/lib/**" + - "!src/microchip/**" workflow_dispatch: jobs: From f405c612dea34e70816ac957a1428b265f81b067 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis <45899760+leonardocavagnis@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:31:27 +0200 Subject: [PATCH 06/11] Update keywords.txt - fix delimeter Co-authored-by: Per Tillisch --- keywords.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keywords.txt b/keywords.txt index 57cb79d..5e97747 100644 --- a/keywords.txt +++ b/keywords.txt @@ -11,14 +11,14 @@ ####################################### beginPacket KEYWORD2 endPacket KEYWORD2 -write KEYWORD2 -parsePacket KEYWORD2 -available KEYWORD2 -read KEYWORD2 -peek KEYWORD2 -flush KEYWORD2 -remoteIP KEYWORD2 -remotePort KEYWORD2 +write KEYWORD2 +parsePacket KEYWORD2 +available KEYWORD2 +read KEYWORD2 +peek KEYWORD2 +flush KEYWORD2 +remoteIP KEYWORD2 +remotePort KEYWORD2 ###################################### # Constants (LITERAL1) From 45a6c04863473aa4b9d292bce6442bea6b2038a4 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Wed, 23 Jul 2025 10:32:17 +0200 Subject: [PATCH 07/11] Add exclude pattern --- .github/workflows/render-documentation.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml index f1b1956..a7fad79 100644 --- a/.github/workflows/render-documentation.yml +++ b/.github/workflows/render-documentation.yml @@ -29,4 +29,5 @@ jobs: with: source-path: './src' target-path: './docs/api.md' - fail-on-warnings: false \ No newline at end of file + fail-on-warnings: false + exclude-pattern: '*/lib/* */microchip/*' \ No newline at end of file From 58ea1cf26ca7655ccd21ff32cd51a25e0b19ed09 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis <45899760+leonardocavagnis@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:35:54 +0200 Subject: [PATCH 08/11] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a21944..27d8c22 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@ To enable Single Pair Ethernet communication, you must connect an external and c If you encounter any issue, please open a bug report [here](https://github.com/arduino-libraries/Arduino_10BASE_T1S/issues). +For questions, comments, or feedback on this library, please use the official [Arduino Forum](https://forum.arduino.cc/). + ## 🫂 Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. -For questions, comments, or feedback on this library, please create an issue on this repository. - ## ⚖️ License -This library is released under the [MPL-2.0 license](http://mozilla.org/MPL/2.0/). \ No newline at end of file +This library is released under the [MPL-2.0 license](http://mozilla.org/MPL/2.0/). From 76fe3bf698028becb8d28bc3c5333ca61ac50979 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Wed, 23 Jul 2025 10:57:58 +0200 Subject: [PATCH 09/11] update doc for class UDP --- src/Arduino_10BASE_T1S_UDP.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Arduino_10BASE_T1S_UDP.h b/src/Arduino_10BASE_T1S_UDP.h index dadef9f..c0d9df2 100644 --- a/src/Arduino_10BASE_T1S_UDP.h +++ b/src/Arduino_10BASE_T1S_UDP.h @@ -33,12 +33,28 @@ * CLASS DECLARATION **************************************************************************************/ + class Arduino_10BASE_T1S_UDP : public UDP { public: /** * @class Arduino_10BASE_T1S_UDP * @brief UDP communication class for Arduino 10BASE-T1S library. + * + * This class provides an implementation of the UDP protocol for the Arduino 10BASE-T1S library. + * It enables sending and receiving UDP packets over a 10BASE-T1S Ethernet interface, supporting + * both transmission and reception of data. The class inherits from the standard Arduino UDP base + * class, and overrides its methods to provide the necessary functionality for packet management, + * buffer handling, and communication with the underlying hardware. + * + * Features: + * - Initialization and termination of UDP sockets. + * - Sending UDP packets to specified IP addresses or hostnames and ports. + * - Receiving UDP packets, with support for buffer management and packet queueing. + * - Access to remote sender's IP address and port for received packets. + * - Internal buffer size configuration for received packets. + * + * @note This class is intended for use with the Arduino 10BASE-T1S library and is not a general-purpose UDP implementation. */ Arduino_10BASE_T1S_UDP(); virtual ~Arduino_10BASE_T1S_UDP(); From de452c338d93de9e9f3ae3d8765e1cb89c1faf4c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 09:03:40 +0000 Subject: [PATCH 10/11] Update documentation --- docs/api.md | 712 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 712 insertions(+) create mode 100644 docs/api.md diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..a6a9638 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,712 @@ +# Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`class ` [`Arduino_10BASE_T1S_PHY_Interface`](#class_arduino__10_b_a_s_e___t1_s___p_h_y___interface) | +`class ` [`Arduino_10BASE_T1S_UDP`](#class_arduino__10_b_a_s_e___t1_s___u_d_p) | UDP communication class for Arduino 10BASE-T1S library. +`class ` [`MacAddress`](#class_mac_address) | +`class ` [`T1SMacSettings`](#class_t1_s_mac_settings) | +`class ` [`T1SPlcaSettings`](#class_t1_s_plca_settings) | +`class ` [`Arduino_10BASE_T1S_UDP::UdpRxPacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet) | + +# class `Arduino_10BASE_T1S_PHY_Interface` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`~Arduino_10BASE_T1S_PHY_Interface`](#class_arduino__10_b_a_s_e___t1_s___p_h_y___interface_1a283666612d51bdd1083cbd567f809313) | | +| [`begin`](#class_arduino__10_b_a_s_e___t1_s___p_h_y___interface_1a5d34573236cf5301ff1fb7cb05b6360d) | Initializes the PHY interface with the specified network settings. | +| [`service`](#class_arduino__10_b_a_s_e___t1_s___p_h_y___interface_1a72b23b0beb34cdc979ea3043a7142ed4) | | + +## Members + +### `~Arduino_10BASE_T1S_PHY_Interface` + +```cpp +inline virtual ~Arduino_10BASE_T1S_PHY_Interface() +``` + +
+ +### `begin` + +```cpp +bool begin(IPAddress const ip_addr, IPAddress const network_mask, IPAddress const gateway, MacAddress const mac_addr, T1SPlcaSettings const t1s_plca_settings, T1SMacSettings const t1s_mac_settings) +``` + +Initializes the PHY interface with the specified network settings. + +This method configures the PHY interface with the provided IP address, network mask, gateway, MAC address, and PLCA settings. + +#### Parameters +* `ip_addr` The IP address to assign to the interface. + +* `network_mask` The network mask to use. + +* `gateway` The gateway IP address. + +* `mac_addr` The MAC address to assign to the interface. + +* `t1s_plca_settings` The PLCA settings to use. + +#### Returns +Returns true if the initialization was successful, false otherwise. +
+ +### `service` + +```cpp +void service() +``` + +
+ +# class `Arduino_10BASE_T1S_UDP` + +```cpp +class Arduino_10BASE_T1S_UDP + : public UDP +``` + +UDP communication class for Arduino 10BASE-T1S library. + +This class provides an implementation of the UDP protocol for the Arduino 10BASE-T1S library. It enables sending and receiving UDP packets over a 10BASE-T1S Ethernet interface, supporting both transmission and reception of data. The class inherits from the standard Arduino UDP base class, and overrides its methods to provide the necessary functionality for packet management, buffer handling, and communication with the underlying hardware. + +Features: + +* Initialization and termination of UDP sockets. + +* Sending UDP packets to specified IP addresses or hostnames and ports. + +* Receiving UDP packets, with support for buffer management and packet queueing. + +* Access to remote sender's IP address and port for received packets. + +* Internal buffer size configuration for received packets. + +This class is intended for use with the Arduino 10BASE-T1S library and is not a general-purpose UDP implementation. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`Arduino_10BASE_T1S_UDP`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1ae0856b8ad00f22033db19558559bb594) | | +| [`~Arduino_10BASE_T1S_UDP`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1aea7ab46c531587898331498288a843f5) | | +| [`begin`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a3d3d71217d030db24729c39328d55467) | Initializes the UDP instance to listen on the specified port. | +| [`stop`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1aef6ec293190f8b50ea7b3a88f3368fb4) | Stops the UDP connection and releases any associated resources. | +| [`beginPacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a21b682176a40547e82b27c1ccfaac02d) | Begins the construction of a UDP packet to the specified IP address and port. | +| [`beginPacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1aa324c5998b19e20a727522e2f50c7699) | Begins the construction of a UDP packet to the specified host and port. | +| [`endPacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a877b4c91ef89d74f1ddd1041383d2ecb) | Finishes the construction of a UDP packet and sends it. | +| [`write`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1adff44e3087ff769ce9e07079f3bac8ce) | Sends a single byte of data in the current UDP packet. | +| [`write`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a951b69ca9da8cfe1863d3f2170312c0c) | Sends a buffer of data in the current UDP packet. | +| [`parsePacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1af7a1b610d6e941a4f75d71d5d837129a) | Sends a string in the current UDP packet. | +| [`available`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a6fda5e99522bf30bf3a0b6a1bcea374c) | Checks if there are any incoming UDP packets available to read. | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1ab0a1ea7854f2175caf3c662da8d65366) | Reads a single byte from the current UDP packet. | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1abcc0b7e38d5c3523e031eaebf946fc5c) | Reads a specified number of bytes from the current UDP packet into a buffer. | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a3e5de3919a838c551d083d000fa43551) | Reads a specified number of bytes from the current UDP packet into a character buffer. | +| [`peek`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a00c33af0714cb9286ca9c022614ecd37) | Peeks at the next byte in the current UDP packet without removing it from the buffer. | +| [`flush`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1aa90a09dd0de4548708561bea2f590db2) | Flushes the current UDP packet buffer. | +| [`remoteIP`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a1da65ecad341c2867e371992acd4610b) | Returns the IP address of the remote host that sent the last received packet. | +| [`remotePort`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a4137463ae8d926184532274a690733c3) | Returns the port number of the remote host that sent the last received packet. | +| [`onUdpRawRecv`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1a60b49bb4946021917c658ace0d56dd77) | | +| [`bufferSize`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1af9fdf26f7aa66527b801f9371788b226) | | + +## Members + +### `Arduino_10BASE_T1S_UDP` + +```cpp +Arduino_10BASE_T1S_UDP() +``` + +
+ +### `~Arduino_10BASE_T1S_UDP` + +```cpp +virtual ~Arduino_10BASE_T1S_UDP() +``` + +
+ +### `begin` + +```cpp +virtual uint8_t begin(uint16_t port) +``` + +Initializes the UDP instance to listen on the specified port. + +This method sets up the UDP protocol to begin listening for incoming packets on the given port. It should be called before attempting to send or receive UDP packets. + +#### Parameters +* `port` The local port to listen on. + +#### Returns +Returns 1 if successful, 0 if there was an error. +
+ +### `stop` + +```cpp +virtual void stop() +``` + +Stops the UDP connection and releases any associated resources. + +This method overrides the base class implementation to properly close the UDP socket and perform necessary cleanup operations. +
+ +### `beginPacket` + +```cpp +virtual int beginPacket(IPAddress ip, uint16_t port) +``` + +Begins the construction of a UDP packet to the specified IP address and port. + +Initializes the UDP packet buffer and prepares it to send data to the given destination. + +#### Parameters +* `ip` The destination IP address. + +* `port` The destination port number. + +#### Returns +int Returns 1 on success, 0 on failure. +
+ +### `beginPacket` + +```cpp +virtual int beginPacket(const char * host, uint16_t port) +``` + +Begins the construction of a UDP packet to the specified host and port. + +Initializes the UDP packet buffer and prepares it to send data to the given destination. + +#### Parameters +* `host` The destination host name or IP address as a string. + +* `port` The destination port number. + +#### Returns +int Returns 1 on success, 0 on failure. +
+ +### `endPacket` + +```cpp +virtual int endPacket() +``` + +Finishes the construction of a UDP packet and sends it. + +This method finalizes the UDP packet and transmits it to the previously specified destination IP address and port. + +#### Returns +int Returns 1 on success, 0 on failure. +
+ +### `write` + +```cpp +virtual size_t write(uint8_t data) +``` + +Sends a single byte of data in the current UDP packet. + +This method appends a single byte to the current UDP packet buffer. + +#### Parameters +* `data` The byte of data to send. + +#### Returns +size_t Returns the number of bytes written, which is always 1 for a single byte. +
+ +### `write` + +```cpp +virtual size_t write(const uint8_t * buffer, size_t size) +``` + +Sends a buffer of data in the current UDP packet. + +This method appends a specified number of bytes from the provided buffer to the current UDP packet buffer. + +#### Parameters +* `buffer` Pointer to the data buffer to send. + +* `size` The number of bytes to write from the buffer. + +#### Returns +size_t Returns the number of bytes written, which may be less than size if an error occurs. +
+ +### `parsePacket` + +```cpp +virtual int parsePacket() +``` + +Sends a string in the current UDP packet. + +This method appends a null-terminated string to the current UDP packet buffer. + +#### Parameters +* `str` Pointer to the null-terminated string to send. + +#### Returns +size_t Returns the number of bytes written, including the null terminator. +
+ +### `available` + +```cpp +virtual int available() +``` + +Checks if there are any incoming UDP packets available to read. + +This method checks the internal buffer for any received UDP packets. + +#### Returns +int Returns the number of available bytes in the current packet, or 0 if no packets are available. +
+ +### `read` + +```cpp +virtual int read() +``` + +Reads a single byte from the current UDP packet. + +This method retrieves the next byte from the current UDP packet buffer. + +#### Returns +int Returns the byte read, or -1 if no data is available. +
+ +### `read` + +```cpp +virtual int read(unsigned char * buffer, size_t len) +``` + +Reads a specified number of bytes from the current UDP packet into a buffer. + +This method reads data from the current UDP packet into the provided buffer. + +#### Parameters +* `buffer` Pointer to the buffer where the data will be stored. + +* `len` The number of bytes to read into the buffer. + +#### Returns +int Returns the number of bytes read, which may be less than len if not enough data is available. +
+ +### `read` + +```cpp +virtual int read(char * buffer, size_t len) +``` + +Reads a specified number of bytes from the current UDP packet into a character buffer. + +This method reads data from the current UDP packet into the provided character buffer. + +#### Parameters +* `buffer` Pointer to the character buffer where the data will be stored. + +* `len` The number of bytes to read into the buffer. + +#### Returns +int Returns the number of bytes read, which may be less than len if not enough data is available. +
+ +### `peek` + +```cpp +virtual int peek() +``` + +Peeks at the next byte in the current UDP packet without removing it from the buffer. + +This method retrieves the next byte from the current UDP packet buffer without consuming it. + +#### Returns +int Returns the next byte, or -1 if no data is available. +
+ +### `flush` + +```cpp +virtual void flush() +``` + +Flushes the current UDP packet buffer. + +This method clears the current UDP packet buffer, discarding any unsent data. +
+ +### `remoteIP` + +```cpp +virtual IPAddress remoteIP() +``` + +Returns the IP address of the remote host that sent the last received packet. + +This method retrieves the IP address of the sender of the last received UDP packet. + +#### Returns +IPAddress Returns the IP address of the remote host. +
+ +### `remotePort` + +```cpp +virtual uint16_t remotePort() +``` + +Returns the port number of the remote host that sent the last received packet. + +This method retrieves the port number of the sender of the last received UDP packet. + +#### Returns +uint16_t Returns the port number of the remote host. +
+ +### `onUdpRawRecv` + +```cpp +void onUdpRawRecv(struct udp_pcb * pcb, struct pbuf * p, const ip_addr_t * addr, uint16_t port) +``` + +
+ +### `bufferSize` + +```cpp +inline void bufferSize(int size) +``` + +
+ +# class `MacAddress` + +```cpp +class MacAddress + : public arduino::Printable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`MacAddress`](#class_mac_address_1a4a8ad51cb7b7cd3aee80114a899f877f) | | +| [`MacAddress`](#class_mac_address_1a5d390e3884a7bf521573d81dc7568c5d) | | +| [`data`](#class_mac_address_1a059cb194dc775450f4db54c459be4dbc) | | +| [`data`](#class_mac_address_1ac8833ad667c20bb0af07fc02ae5c1b81) | | +| [`create_from_uid`](#class_mac_address_1a3ea00be39c7c6e07d70bd30cc1a59383) | | + +## Members + +### `MacAddress` + +```cpp +inline MacAddress() +``` + +
+ +### `MacAddress` + +```cpp +MacAddress(uint8_t const * mac) +``` + +
+ +### `data` + +```cpp +inline uint8_t * data() +``` + +
+ +### `data` + +```cpp +inline uint8_t const * data() const +``` + +
+ +### `create_from_uid` + +```cpp +static MacAddress create_from_uid() +``` + +
+ +# class `T1SMacSettings` + +```cpp +class T1SMacSettings + : public arduino::Printable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`T1SMacSettings`](#class_t1_s_mac_settings_1a4287ed1602f9fdcffe72cb22c3888ec0) | | +| [`T1SMacSettings`](#class_t1_s_mac_settings_1a7061757ec4c7ab69b1f4f66dbd0212a4) | | +| [`printTo`](#class_t1_s_mac_settings_1afd782262ddddd0d38ba89cc7fa148c8d) | | +| [`isMacPromiscuousModeEnabled`](#class_t1_s_mac_settings_1a72f36124778c9dc82b80dcf262f041c8) | | +| [`isMacTxCutThroughEnabled`](#class_t1_s_mac_settings_1ab34a1b0e45e3ad08b11c6edf2bad065c) | | +| [`isMacRxCutThroughEnabled`](#class_t1_s_mac_settings_1ae7fc48fd58968be4de157f9af1a0c5ee) | | + +## Members + +### `T1SMacSettings` + +```cpp +inline T1SMacSettings() +``` + +
+ +### `T1SMacSettings` + +```cpp +T1SMacSettings(bool const mac_promiscuous_mode, bool const mac_tx_cut_through, bool const mac_rx_cut_through) +``` + +
+ +### `printTo` + +```cpp +virtual size_t printTo(Print & p) const +``` + +
+ +### `isMacPromiscuousModeEnabled` + +```cpp +inline bool isMacPromiscuousModeEnabled() const +``` + +
+ +### `isMacTxCutThroughEnabled` + +```cpp +inline bool isMacTxCutThroughEnabled() const +``` + +
+ +### `isMacRxCutThroughEnabled` + +```cpp +inline bool isMacRxCutThroughEnabled() const +``` + +
+ +# class `T1SPlcaSettings` + +```cpp +class T1SPlcaSettings + : public arduino::Printable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`T1SPlcaSettings`](#class_t1_s_plca_settings_1a98cd83059eb840b1ad960f688d61b749) | | +| [`T1SPlcaSettings`](#class_t1_s_plca_settings_1abe2007ae55d1847b646fb2e93a251b5c) | | +| [`T1SPlcaSettings`](#class_t1_s_plca_settings_1a3639bf3ba8ac9190baf3c7782d6dafe0) | | +| [`printTo`](#class_t1_s_plca_settings_1a6dd605df1a8952cbed87faec1dbbbba4) | | +| [`nodeId`](#class_t1_s_plca_settings_1ad5526a2c53ee9c501a664fef31a77c90) | | +| [`nodeCount`](#class_t1_s_plca_settings_1a2ae01dd9f4191819d2fc00336f5d9f98) | | +| [`burstCount`](#class_t1_s_plca_settings_1a96ff17ba62f03af113e7b8b682c2cd54) | | +| [`burstTimer`](#class_t1_s_plca_settings_1a7190546c8dcb115100458e909eeb6894) | | + +## Members + +### `T1SPlcaSettings` + +```cpp +inline T1SPlcaSettings() +``` + +
+ +### `T1SPlcaSettings` + +```cpp +inline T1SPlcaSettings(uint8_t const node_id) +``` + +
+ +### `T1SPlcaSettings` + +```cpp +T1SPlcaSettings(uint8_t const node_id, uint8_t const node_count, uint8_t const burst_count, uint8_t const burst_timer) +``` + +
+ +### `printTo` + +```cpp +virtual size_t printTo(Print & p) const +``` + +
+ +### `nodeId` + +```cpp +inline uint8_t nodeId() const +``` + +
+ +### `nodeCount` + +```cpp +inline uint8_t nodeCount() const +``` + +
+ +### `burstCount` + +```cpp +inline uint8_t burstCount() const +``` + +
+ +### `burstTimer` + +```cpp +inline uint8_t burstTimer() const +``` + +
+ +# class `Arduino_10BASE_T1S_UDP::UdpRxPacket` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +| [`UdpRxPacket`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1aacda8f430602f5cb9ff2a7b7280942d9) | | +| [`remoteIP`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1aa1a20fd0505c95d0937dfb8814bc7c4a) | | +| [`remotePort`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1a70254bf5684f1c304cf9d755a1a2be8e) | | +| [`totalSize`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1a86fb44b5697105edb2e1306a332d2c18) | | +| [`available`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1af3c026909e38d8c01a9f7494531c883f) | | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1a8d8efe06e6a343b9601f2592fd6ff3f8) | | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1a13ec2494c7c6059f7ec2a2e3f0cff9b7) | | +| [`read`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1af69ec99a43fcefe2dcac31600e6428fa) | | +| [`peek`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1adc3afaaf394de25a145549c550602b86) | | +| [`SharedPtr`](#class_arduino__10_b_a_s_e___t1_s___u_d_p_1_1_udp_rx_packet_1a12fcd44631929c7954872bf2d3fc827d) | | + +## Members + +### `UdpRxPacket` + +```cpp +inline UdpRxPacket(IPAddress const remote_ip, uint16_t const remote_port, uint8_t const * p_data, size_t const data_len) +``` + +
+ +### `remoteIP` + +```cpp +inline IPAddress remoteIP() const +``` + +
+ +### `remotePort` + +```cpp +inline uint16_t remotePort() const +``` + +
+ +### `totalSize` + +```cpp +inline size_t totalSize() const +``` + +
+ +### `available` + +```cpp +inline int available() +``` + +
+ +### `read` + +```cpp +inline int read() +``` + +
+ +### `read` + +```cpp +inline int read(unsigned char * buffer, size_t len) +``` + +
+ +### `read` + +```cpp +inline int read(char * buffer, size_t len) +``` + +
+ +### `peek` + +```cpp +inline int peek() +``` + +
+ +### `SharedPtr` + +```cpp +typedef SharedPtr +``` + +
+ From 69bb7f30ffebba6b21012d641fccfa4ec0271769 Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Wed, 23 Jul 2025 12:13:28 +0200 Subject: [PATCH 11/11] restore main branch in render-doc workflow --- .github/workflows/render-documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/render-documentation.yml b/.github/workflows/render-documentation.yml index a7fad79..0a3e51f 100644 --- a/.github/workflows/render-documentation.yml +++ b/.github/workflows/render-documentation.yml @@ -3,7 +3,7 @@ name: Render Documentation on: push: branches: - - docs_refactor + - main paths: - ".github/workflows/render-documentation.ya?ml" - "examples/**" @@ -12,7 +12,7 @@ on: - "!src/microchip/**" pull_request: branches: - - docs_refactor + - main paths: - ".github/workflows/render-documentation.ya?ml" - "examples/**"