Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ add_subdirectory(logging)
add_subdirectory(lte)
add_subdirectory(math)
add_subdirectory(mlearning)
add_subdirectory(modbus)
add_subdirectory(netutils)
add_subdirectory(nshlib)
add_subdirectory(platform)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion modbus/CMakeLists.txt → industry/modbus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/modbus/CMakeLists.txt
# apps/industry/modbus/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
4 changes: 2 additions & 2 deletions modbus/Make.defs → industry/modbus/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/Make.defs
# apps/industry/modbus/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -20,4 +20,4 @@
#
############################################################################

include $(wildcard $(APPDIR)/modbus/*/Make.defs)
include $(wildcard $(APPDIR)/industry/modbus/*/Make.defs)
2 changes: 1 addition & 1 deletion modbus/Makefile → industry/modbus/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/Makefile
# apps/industry/modbus/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/modbus/freemodbus/CMakeLists.txt
# apps/industry/modbus/freemodbus/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
22 changes: 11 additions & 11 deletions modbus/freemodbus/Kconfig → industry/modbus/freemodbus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -144,26 +144,26 @@ 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

config MB_ASCII_MASTER
bool "Modbus ASCII master"
default n
depends on MODBUS_MASTER
depends on INDUSTRY_MODBUS_MASTER

config MB_RTU_MASTER
bool "Modbus RTU master"
default n
depends on MODBUS_MASTER
depends on INDUSTRY_MODBUS_MASTER

config MB_PORT_HAS_CLOSE
bool "Platform close callbacks"
default n
depends on MODBUS_MASTER
depends on INDUSTRY_MODBUS_MASTER
---help---
A port which wants to get an callback must select
CONFIG_MB_HAS_CLOSE and provide vMBMasterPortClose() as
Expand Down Expand Up @@ -250,9 +250,9 @@ config MB_MASTER_FUNC_READWRITE_HOLDING_ENABLED
If the Read/Write Multiple Registers function should be enabled.

endif # MB_ASCII_MASTER || MB_RTU_MASTER
endif # MODBUS
endif # INDUSTRY_MODBUS

config MODBUS_DISABLE_LOG
config INDUSTRY_MODBUS_DISABLE_LOG
bool "Disable logging for FreeModBus"
default !FILE_STREAM
---help---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/Make.defs
# apps/industry/modbus/freemodbus/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -20,6 +20,6 @@
#
############################################################################

ifneq ($(CONFIG_MODBUS),)
CONFIGURED_APPS += $(APPDIR)/modbus/freemodbus
ifneq ($(CONFIG_INDUSTRY_MODBUS),)
CONFIGURED_APPS += $(APPDIR)/industry/modbus/freemodbus
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/Makefile
# apps/industry/modbus/freemodbus/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/ascii/Make.defs
# apps/industry/modbus/freemodbus/ascii/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/modbus/ascii/mbascii.c
* apps/industry/modbus/freemodbus/ascii/mbascii.c
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2006 Christian Walter <wolti@sil.at>
Expand Down Expand Up @@ -69,7 +69,7 @@
STATE_RX_IDLE, /* Receiver is in idle state. */
STATE_RX_RCV, /* Frame is being received. */
STATE_RX_WAIT_EOF /* Wait for End of Frame. */
} eMBRcvState;

Check failure on line 72 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

typedef enum
{
Expand All @@ -78,21 +78,21 @@
STATE_TX_DATA, /* Sending of data (Address, Data, LRC). */
STATE_TX_END, /* End of transmission. */
STATE_TX_NOTIFY /* Notify sender that the frame has been sent. */
} eMBSndState;

Check failure on line 81 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

typedef enum
{
BYTE_HIGH_NIBBLE, /* Character for high nibble of byte. */
BYTE_LOW_NIBBLE /* Character for low nibble of byte. */
} eMBBytePos;

Check failure on line 87 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

/****************************************************************************
* Private Function Prototypes
****************************************************************************/

static uint8_t prvucMBint8_t2BIN(uint8_t ucCharacter);

Check failure on line 93 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 93 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
static uint8_t prvucMBBIN2int8_t(uint8_t ucByte);

Check failure on line 94 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 94 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found
static uint8_t prvucMBLRC(uint8_t *pucFrame, uint16_t usLen);

Check failure on line 95 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 95 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

Check failure on line 95 in industry/modbus/freemodbus/ascii/mbascii.c

View workflow job for this annotation

GitHub Actions / check

Mixed case identifier found

/****************************************************************************
* Private Data
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/functions/Make.defs
# apps/industry/modbus/freemodbus/functions/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
2 changes: 1 addition & 1 deletion modbus/freemodbus/mb.c → industry/modbus/freemodbus/mb.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/nuttx/Make.defs
# apps/industry/modbus/freemodbus/nuttx/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -103,4 +103,4 @@ bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs);
}
#endif

#endif /* __APPS_MODBUS_NUTTX_PORT_H */
#endif /* __APPS_INDUSTRY_MODBUS_NUTTX_PORT_H */
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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, ...)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/modbus/freemodbus/rtu/Make.defs
# apps/industry/modbus/freemodbus/rtu/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
File renamed without changes.
Loading
Loading