diff --git a/iot/Kconfig b/iot/Kconfig index db6c237891..bde73b60ac 100644 --- a/iot/Kconfig +++ b/iot/Kconfig @@ -69,4 +69,5 @@ 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" endmenu diff --git a/iot/OpENer/Kconfig b/iot/OpENer/Kconfig new file mode 100644 index 0000000000..6996bd96b9 --- /dev/null +++ b/iot/OpENer/Kconfig @@ -0,0 +1,113 @@ + +# 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 + +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 "OpENer 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 + + config PKG_USING_OPENER_PORT + bool + default y + + if PKG_USING_OPENER_PORT + + config PKG_OPENER_PORT_PATH + string + default "/packages/iot/OpENer/OpENer_port" + + choice + prompt "OpENer Port 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 + +endif diff --git a/iot/OpENer/OpENer_port/package.json b/iot/OpENer/OpENer_port/package.json new file mode 100644 index 0000000000..7b741d5bba --- /dev/null +++ b/iot/OpENer/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" + } + ] +} 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" + } + ] +}