From bf943196ddf1c24726dd12ad0f5509b5db06e57f Mon Sep 17 00:00:00 2001 From: mlw <2544047213@qq.com> Date: Mon, 30 Dec 2024 23:37:19 +0800 Subject: [PATCH 1/3] add OpENer package --- iot/Kconfig | 2 + iot/OpENer/Kconfig | 85 ++++++++++++++++++++++++++++++++++++ iot/OpENer/package.json | 26 +++++++++++ iot/OpENer_port/Kconfig | 31 +++++++++++++ iot/OpENer_port/package.json | 26 +++++++++++ 5 files changed, 170 insertions(+) create mode 100644 iot/OpENer/Kconfig create mode 100644 iot/OpENer/package.json create mode 100644 iot/OpENer_port/Kconfig create mode 100644 iot/OpENer_port/package.json diff --git a/iot/Kconfig b/iot/Kconfig index db6c237891..83119728d6 100644 --- a/iot/Kconfig +++ b/iot/Kconfig @@ -69,4 +69,6 @@ source "$PKGS_DIR/packages/iot/matter-adaptation-layer/Kconfig" source "$PKGS_DIR/packages/iot/lhc_modbus/Kconfig" source "$PKGS_DIR/packages/iot/qmodbus/Kconfig" source "$PKGS_DIR/packages/iot/p-net-rtt/Kconfig" +source "$PKGS_DIR/packages/iot/OpENer/Kconfig" +source "$PKGS_DIR/packages/iot/OpENer_port/Kconfig" endmenu diff --git a/iot/OpENer/Kconfig b/iot/OpENer/Kconfig new file mode 100644 index 0000000000..9ac9124cd8 --- /dev/null +++ b/iot/OpENer/Kconfig @@ -0,0 +1,85 @@ + +# Kconfig file for package OpENer +menuconfig PKG_USING_OPENER + bool "OpENer: EtherNet/IP stack for I/O adapter devices" + default n + select RT_USING_SAL if RT_VER_NUM < 0x40100 + select SAL_USING_POSIX if RT_VER_NUM < 0x40100 + select RT_USING_DFS if RT_VER_NUM < 0x40100 + select RT_USING_POSIX_FS if RT_VER_NUM >= 0x40100 + select RT_USING_POSIX_STDIO if RT_VER_NUM >= 0x40100 + select RT_USING_POSIX_SOCKET if RT_VER_NUM >= 0x40100 + select PKG_USING_OPENER_PORT + +if PKG_USING_OPENER + + config PKG_OPENER_PATH + string + default "/packages/iot/OpENer" + + config PKG_OPENER_HOSTNAME + string "Set OpENer hostname" + default "rtthreaddev" + + config PKG_OPENER_WITH_TRACES + bool "Enable OpENer traces" + default y + + if PKG_OPENER_WITH_TRACES + config PKG_OPENER_TRACE_LEVEL + int "Set OpENer trace level" + default 3 + help + bit 0: ERR + bit 1: WARN + bit 2: STATE + bit 3: INFO + endif + + config PKG_OPENER_ETHERNET_BUFFER_SIZE + int "Set OpENer Ethernet buffer size" + default 512 + + config OPENER_DEVICE_VENDOR_ID + int "Set OpENer device vendor ID" + default 1 + + config OPENER_DEVICE_TYPE + int "Set OpENer device type" + default 12 + + config OPENER_DEVICE_PRODUCT_CODE + int "Set OpENer device product code" + default 65001 + + config OPENER_DEVICE_MAJOR_REVISION + int "Set OpENer device major revision" + default 2 + + config OPENER_DEVICE_MINOR_REVISION + int "Set OpENer device minor revision" + default 3 + + config OPENER_DEVICE_NAME + string "Set OpENer device name" + default "OpENer PC" + + choice + prompt "Version" + default PKG_USING_OPENER_LATEST_VERSION + help + Select the package version + + config PKG_USING_OPENER_LATEST_VERSION + bool "latest" + endchoice + + config PKG_OPENER_VER + string + default "latest" if PKG_USING_OPENER_LATEST_VERSION + + config PKG_OPENER_VER_NUM + hex + default 0x99999 if PKG_USING_OPENER_LATEST_VERSION +endif + diff --git a/iot/OpENer/package.json b/iot/OpENer/package.json new file mode 100644 index 0000000000..560ac34a95 --- /dev/null +++ b/iot/OpENer/package.json @@ -0,0 +1,26 @@ +{ + "name": "OpENer", + "description": "EtherNet/IP stack for I/O adapter devices", + "description_zh": "用于 I/O 适配器设备的 EtherNet/IP 堆栈", + "enable": "PKG_USING_OPENER", + "keywords": [ + "EtherNet/IP" + ], + "category": "iot", + "author": { + "name": "Martin Melik", + "email": "martin.melik@gmail.com", + "github": "MartinMelikMerkumians" + }, + "license": "BSD-3-Clause", + "repository": "https://github.com/EIPStackGroup/OpENer", + "homepage": "https://github.com/EIPStackGroup/OpENer#readme", + "site": [ + { + "version": "latest", + "URL": "https://github.com/EIPStackGroup/OpENer.git", + "filename": "OpENer.zip", + "VER_SHA": "70d6947c6ef97c5c8ccbc908b94651432e18cf9c" + } + ] +} diff --git a/iot/OpENer_port/Kconfig b/iot/OpENer_port/Kconfig new file mode 100644 index 0000000000..88a9b62632 --- /dev/null +++ b/iot/OpENer_port/Kconfig @@ -0,0 +1,31 @@ + +# Kconfig file for package OpENer_port +menuconfig PKG_USING_OPENER_PORT + bool "OpENer_port: Porting layer for OpENer" + default n + +if PKG_USING_OPENER_PORT + + config PKG_OPENER_PORT_PATH + string + default "/packages/iot/OpENer_port" + + choice + prompt "Version" + default PKG_USING_OPENER_PORT_LATEST_VERSION + help + Select the package version + + config PKG_USING_OPENER_PORT_LATEST_VERSION + bool "latest" + endchoice + + config PKG_OPENER_PORT_VER + string + default "latest" if PKG_USING_OPENER_PORT_LATEST_VERSION + + config PKG_OPENER_PORT_VER_NUM + hex + default 0x99999 if PKG_USING_OPENER_PORT_LATEST_VERSION +endif + diff --git a/iot/OpENer_port/package.json b/iot/OpENer_port/package.json new file mode 100644 index 0000000000..7b741d5bba --- /dev/null +++ b/iot/OpENer_port/package.json @@ -0,0 +1,26 @@ +{ + "name": "OpENer_port", + "description": "RT-Thread port of OpENer", + "description_zh": "RT-Thread 的 OpENer 移植", + "enable": "PKG_USING_OPENER_PORT", + "keywords": [ + "EtherNet/IP" + ], + "category": "iot", + "author": { + "name": "loogg", + "email": "2544047213@qq.com", + "github": "loogg" + }, + "license": "BSD-3-Clause", + "repository": "https://github.com/loogg/OpENer_rtt_port", + "homepage": "https://github.com/loogg/OpENer_rtt_port#readme", + "site": [ + { + "version": "latest", + "URL": "https://github.com/loogg/OpENer_rtt_port.git", + "filename": "OpENer_port.zip", + "VER_SHA": "master" + } + ] +} From b477c07254552689c5e3d77ea1305db5c037837e Mon Sep 17 00:00:00 2001 From: Rbb666 Date: Thu, 2 Jan 2025 13:55:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8DOpENer=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E5=8C=85ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iot/Kconfig | 1 - iot/OpENer/Kconfig | 20 +++++++++++++-- iot/{ => OpENer}/OpENer_port/package.json | 0 iot/OpENer_port/Kconfig | 31 ----------------------- 4 files changed, 18 insertions(+), 34 deletions(-) rename iot/{ => OpENer}/OpENer_port/package.json (100%) delete mode 100644 iot/OpENer_port/Kconfig diff --git a/iot/Kconfig b/iot/Kconfig index 83119728d6..bde73b60ac 100644 --- a/iot/Kconfig +++ b/iot/Kconfig @@ -70,5 +70,4 @@ source "$PKGS_DIR/packages/iot/lhc_modbus/Kconfig" source "$PKGS_DIR/packages/iot/qmodbus/Kconfig" source "$PKGS_DIR/packages/iot/p-net-rtt/Kconfig" source "$PKGS_DIR/packages/iot/OpENer/Kconfig" -source "$PKGS_DIR/packages/iot/OpENer_port/Kconfig" endmenu diff --git a/iot/OpENer/Kconfig b/iot/OpENer/Kconfig index 9ac9124cd8..55d8451cf2 100644 --- a/iot/OpENer/Kconfig +++ b/iot/OpENer/Kconfig @@ -9,7 +9,6 @@ menuconfig PKG_USING_OPENER select RT_USING_POSIX_FS if RT_VER_NUM >= 0x40100 select RT_USING_POSIX_STDIO if RT_VER_NUM >= 0x40100 select RT_USING_POSIX_SOCKET if RT_VER_NUM >= 0x40100 - select PKG_USING_OPENER_PORT if PKG_USING_OPENER @@ -81,5 +80,22 @@ if PKG_USING_OPENER config PKG_OPENER_VER_NUM hex default 0x99999 if PKG_USING_OPENER_LATEST_VERSION -endif + if PKG_USING_OPENER_PORT + + config PKG_OPENER_PORT_PATH + string + default "/packages/iot/OpENer/OpENer_port" + + choice + prompt "Version" + default PKG_USING_OPENER_PORT_LATEST_VERSION + help + Select the package version + + config PKG_USING_OPENER_PORT_LATEST_VERSION + bool "latest" + endchoice + endif + +endif diff --git a/iot/OpENer_port/package.json b/iot/OpENer/OpENer_port/package.json similarity index 100% rename from iot/OpENer_port/package.json rename to iot/OpENer/OpENer_port/package.json diff --git a/iot/OpENer_port/Kconfig b/iot/OpENer_port/Kconfig deleted file mode 100644 index 88a9b62632..0000000000 --- a/iot/OpENer_port/Kconfig +++ /dev/null @@ -1,31 +0,0 @@ - -# Kconfig file for package OpENer_port -menuconfig PKG_USING_OPENER_PORT - bool "OpENer_port: Porting layer for OpENer" - default n - -if PKG_USING_OPENER_PORT - - config PKG_OPENER_PORT_PATH - string - default "/packages/iot/OpENer_port" - - choice - prompt "Version" - default PKG_USING_OPENER_PORT_LATEST_VERSION - help - Select the package version - - config PKG_USING_OPENER_PORT_LATEST_VERSION - bool "latest" - endchoice - - config PKG_OPENER_PORT_VER - string - default "latest" if PKG_USING_OPENER_PORT_LATEST_VERSION - - config PKG_OPENER_PORT_VER_NUM - hex - default 0x99999 if PKG_USING_OPENER_PORT_LATEST_VERSION -endif - From b8e07e74e3a0af71e7c164bb3171738ed20a9c2e Mon Sep 17 00:00:00 2001 From: mlw <2544047213@qq.com> Date: Thu, 2 Jan 2025 15:19:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8DOpENer=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E5=8C=85=E6=9C=AA=E9=80=89=E4=B8=ADport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iot/OpENer/Kconfig | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/iot/OpENer/Kconfig b/iot/OpENer/Kconfig index 55d8451cf2..6996bd96b9 100644 --- a/iot/OpENer/Kconfig +++ b/iot/OpENer/Kconfig @@ -64,7 +64,7 @@ if PKG_USING_OPENER default "OpENer PC" choice - prompt "Version" + prompt "OpENer Version" default PKG_USING_OPENER_LATEST_VERSION help Select the package version @@ -81,6 +81,10 @@ if PKG_USING_OPENER hex default 0x99999 if PKG_USING_OPENER_LATEST_VERSION + config PKG_USING_OPENER_PORT + bool + default y + if PKG_USING_OPENER_PORT config PKG_OPENER_PORT_PATH @@ -88,7 +92,7 @@ if PKG_USING_OPENER default "/packages/iot/OpENer/OpENer_port" choice - prompt "Version" + prompt "OpENer Port Version" default PKG_USING_OPENER_PORT_LATEST_VERSION help Select the package version @@ -96,6 +100,14 @@ if PKG_USING_OPENER config PKG_USING_OPENER_PORT_LATEST_VERSION bool "latest" endchoice + + config PKG_OPENER_PORT_VER + string + default "latest" if PKG_USING_OPENER_PORT_LATEST_VERSION + + config PKG_OPENER_PORT_VER_NUM + hex + default 0x99999 if PKG_USING_OPENER_PORT_LATEST_VERSION endif endif