mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
apps/modbus: Move modbus to inside industry/
Modbus is a protocol mostly used on industries and since it is a protocol it is not a category to be at root of apps/ Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
parent
8e9f5a8d3a
commit
2ee08209a0
45 changed files with 60 additions and 60 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# ##############################################################################
|
||||
# apps/modbus/CMakeLists.txt
|
||||
# apps/industry/modbus/CMakeLists.txt
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/Make.defs
|
||||
# apps/industry/modbus/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/Makefile
|
||||
# apps/industry/modbus/Makefile
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# ##############################################################################
|
||||
# apps/modbus/freemodbus/CMakeLists.txt
|
||||
# apps/industry/modbus/freemodbus/CMakeLists.txt
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -20,11 +20,11 @@
|
|||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_MODBUS)
|
||||
if(CONFIG_INDUSTRY_MODBUS)
|
||||
|
||||
set(CSRCS)
|
||||
|
||||
if(CONFIG_MODBUS_SLAVE)
|
||||
if(CONFIG_INDUSTRY_MODBUS_SLAVE)
|
||||
list(APPEND CSRCS mb.c)
|
||||
endif()
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ if(CONFIG_MODBUS)
|
|||
|
||||
list(APPEND CSRCS nuttx/portother.c)
|
||||
|
||||
if(CONFIG_MODBUS_SLAVE)
|
||||
if(CONFIG_INDUSTRY_MODBUS_SLAVE)
|
||||
list(APPEND CSRCS nuttx/portevent.c nuttx/portserial.c nuttx/porttimer.c)
|
||||
endif()
|
||||
|
||||
|
|
@ -4,11 +4,11 @@
|
|||
#
|
||||
|
||||
menu "FreeModBus"
|
||||
config MODBUS
|
||||
config INDUSTRY_MODBUS
|
||||
bool "Modbus support using FreeModbus"
|
||||
default n
|
||||
|
||||
if MODBUS
|
||||
if INDUSTRY_MODBUS
|
||||
|
||||
config MB_FUNC_HANDLERS_MAX
|
||||
int "Maximum number of Modbus functions"
|
||||
|
|
@ -20,11 +20,11 @@ config MB_FUNC_HANDLERS_MAX
|
|||
the sum of all enabled functions in this file and custom function
|
||||
handlers. If set to small adding more functions will fail.
|
||||
|
||||
config MODBUS_SLAVE
|
||||
config INDUSTRY_MODBUS_SLAVE
|
||||
bool "Modbus slave support via FreeModBus"
|
||||
default n
|
||||
|
||||
if MODBUS_SLAVE
|
||||
if INDUSTRY_MODBUS_SLAVE
|
||||
config MB_ASCII_ENABLED
|
||||
bool "Modbus ASCII support"
|
||||
default y
|
||||
|
|
@ -144,9 +144,9 @@ config MB_FUNC_READWRITE_HOLDING_ENABLED
|
|||
---help---
|
||||
If the Read/Write Multiple Registers function should be enabled.
|
||||
|
||||
endif # MODBUS_SLAVE
|
||||
endif # INDUSTRY_MODBUS_SLAVE
|
||||
|
||||
config MODBUS_MASTER
|
||||
config INDUSTRY_MODBUS_MASTER
|
||||
bool "Modbus Master support via FreeModBus"
|
||||
default n
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ config MB_MASTER_FUNC_READWRITE_HOLDING_ENABLED
|
|||
endif # MB_ASCII_MASTER || MB_RTU_MASTER
|
||||
endif # MODBUS
|
||||
|
||||
config MODBUS_DISABLE_LOG
|
||||
config INDUSTRY_MODBUS_DISABLE_LOG
|
||||
bool "Disable logging for FreeModBus"
|
||||
default !FILE_STREAM
|
||||
---help---
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/Make.defs
|
||||
# apps/industry/modbus/freemodbus/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -20,6 +20,6 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
ifneq ($(CONFIG_MODBUS),)
|
||||
CONFIGURED_APPS += $(APPDIR)/modbus/freemodbus
|
||||
ifneq ($(CONFIG_INDUSTRY_MODBUS),)
|
||||
CONFIGURED_APPS += $(APPDIR)/industry/modbus/freemodbus
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/Makefile
|
||||
# apps/industry/modbus/freemodbus/Makefile
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -24,9 +24,9 @@ include $(APPDIR)/Make.defs
|
|||
|
||||
# FreeModBus Library
|
||||
|
||||
ifeq ($(CONFIG_MODBUS),y)
|
||||
ifeq ($(CONFIG_INDUSTRY_MODBUS),y)
|
||||
|
||||
ifeq ($(CONFIG_MODBUS_SLAVE),y)
|
||||
ifeq ($(CONFIG_INDUSTRY_MODBUS_SLAVE),y)
|
||||
CSRCS += mb.c
|
||||
endif
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/ascii/Make.defs
|
||||
# apps/industry/modbus/freemodbus/ascii/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -26,6 +26,6 @@ CSRCS += mbascii.c
|
|||
|
||||
DEPPATH += --dep-path ascii
|
||||
VPATH += :ascii
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/freemodbus/ascii
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/industry/modbus/freemodbus/ascii
|
||||
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/ascii/mbascii.c
|
||||
* apps/industry/modbus/ascii/mbascii.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/ascii/mbascii.h
|
||||
* apps/industry/modbus/ascii/mbascii.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/functions/Make.defs
|
||||
# apps/industry/modbus/freemodbus/functions/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -33,4 +33,4 @@ endif
|
|||
|
||||
DEPPATH += --dep-path functions
|
||||
VPATH += :functions
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/freemodbus/functions
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/industry/modbus/freemodbus/functions
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/functions/mbfunccoils_m.c
|
||||
* apps/industry/modbus/functions/mbfunccoils_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/functions/mbfuncdiag.c
|
||||
* apps/industry/modbus/functions/mbfuncdiag.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/functions/mbfuncdisc_m.c
|
||||
* apps/industry/modbus/functions/mbfuncdisc_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/functions/mbfuncholding_m.c
|
||||
* apps/industry/modbus/functions/mbfuncholding_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/functions/mbfuncinput_m.c
|
||||
* apps/industry/modbus/functions/mbfuncinput_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/mb.c
|
||||
* apps/industry/modbus/mb.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/nuttx/Make.defs
|
||||
# apps/industry/modbus/freemodbus/nuttx/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
CSRCS += portother.c
|
||||
|
||||
ifeq ($(CONFIG_MODBUS_SLAVE),y)
|
||||
ifeq ($(CONFIG_INDUSTRY_MODBUS_SLAVE),y)
|
||||
CSRCS += portevent.c portserial.c porttimer.c
|
||||
endif
|
||||
|
||||
|
|
@ -32,4 +32,4 @@ endif
|
|||
|
||||
DEPPATH += --dep-path nuttx
|
||||
VPATH += :nuttx
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/freemodbus/nuttx
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/industry/modbus/freemodbus/nuttx
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/port.h
|
||||
* apps/industry/modbus/nuttx/port.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -28,8 +28,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __APPS_MODBUS_NUTTX_PORT_H
|
||||
#define __APPS_MODBUS_NUTTX_PORT_H
|
||||
#ifndef __APPS_INDUSTRY_MODBUS_NUTTX_PORT_H
|
||||
#define __APPS_INDUSTRY_MODBUS_NUTTX_PORT_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
|
|
@ -79,7 +79,7 @@ typedef enum
|
|||
|
||||
void vMBPortEnterCritical(void);
|
||||
void vMBPortExitCritical(void);
|
||||
#ifndef CONFIG_MODBUS_DISABLE_LOG
|
||||
#ifndef CONFIG_INDUSTRY_MODBUS_DISABLE_LOG
|
||||
void vMBPortLog(eMBPortLogLevel eLevel, const char *szModule,
|
||||
const char *szFmt, ...) printf_like(3, 4);
|
||||
#else
|
||||
|
|
@ -103,4 +103,4 @@ bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_MODBUS_NUTTX_PORT_H */
|
||||
#endif /* __APPS_INDUSTRY_MODBUS_NUTTX_PORT_H */
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portevent.c
|
||||
* apps/industry/modbus/nuttx/portevent.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portevent_m.c
|
||||
* apps/industry/modbus/nuttx/portevent_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portother.c
|
||||
* apps/industry/modbus/nuttx/portother.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -73,7 +73,7 @@ void vMBPortLogFile(FILE * fNewLogFile)
|
|||
fLogFile = fNewLogFile;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_MODBUS_DISABLE_LOG
|
||||
#ifndef CONFIG_INDUSTRY_MODBUS_DISABLE_LOG
|
||||
void vMBPortLog(eMBPortLogLevel eLevel, const char * szModule,
|
||||
const char * szFmt, ...)
|
||||
{
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portother_m.c
|
||||
* apps/industry/modbus/nuttx/portother_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portserial.c
|
||||
* apps/industry/modbus/nuttx/portserial.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/portserial_m.c
|
||||
* apps/industry/modbus/nuttx/portserial_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/porttimer.c
|
||||
* apps/industry/modbus/nuttx/porttimer.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/nuttx/porttimer_m.c
|
||||
* apps/industry/modbus/nuttx/porttimer_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/rtu/Make.defs
|
||||
# apps/industry/modbus/freemodbus/rtu/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -40,6 +40,6 @@ endif
|
|||
|
||||
DEPPATH += --dep-path rtu
|
||||
VPATH += :rtu
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/freemodbus/rtu
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/industry/modbus/freemodbus/rtu
|
||||
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbcrc.c
|
||||
* apps/industry/modbus/rtu/mbcrc.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbrtu.c
|
||||
* apps/industry/modbus/rtu/mbrtu.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbrtu.h
|
||||
* apps/industry/modbus/rtu/mbrtu.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbrtu_m.c
|
||||
* apps/industry/modbus/rtu/mbrtu_m.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 China Beijing Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbrtu_m.h
|
||||
* apps/industry/modbus/rtu/mbrtu_m.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2013 China Beijing Armink <armink.ztl@gmail.com>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# apps/modbus/freemodbus/tcp/Make.defs
|
||||
# apps/industry/modbus/freemodbus/tcp/Make.defs
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
|
@ -26,6 +26,6 @@ CSRCS += mbtcp.c
|
|||
|
||||
DEPPATH += --dep-path tcp
|
||||
VPATH += :tcp
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/modbus/freemodbus/tcp
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/industry/modbus/freemodbus/tcp
|
||||
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/tcp/mbtcp.c
|
||||
* apps/industry/modbus/tcp/mbtcp.c
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* apps/modbus/tcp/mbtcp.h
|
||||
* apps/industry/modbus/tcp/mbtcp.h
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
|
||||
Loading…
Add table
Add a link
Reference in a new issue