diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-07-21 15:33:53 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-07-21 15:33:53 +0000 |
commit | 358240268d2ed3c3b44ba67d3c426c06a7bb2ea2 (patch) | |
tree | e635a2747aae4440090476ee08bf31a801d77e4e /nuttx | |
parent | 4c2b6c49c91abfb10f554dcf219e01e7a88884fb (diff) | |
download | px4-firmware-358240268d2ed3c3b44ba67d3c426c06a7bb2ea2.tar.gz px4-firmware-358240268d2ed3c3b44ba67d3c426c06a7bb2ea2.tar.bz2 px4-firmware-358240268d2ed3c3b44ba67d3c426c06a7bb2ea2.zip |
Add FreeModBus to NuttX build system
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4962 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/configs/lpc4330-xplorer/nsh/defconfig | 66 | ||||
-rw-r--r-- | nuttx/configs/lpc4330-xplorer/ostest/defconfig | 66 |
2 files changed, 132 insertions, 0 deletions
diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index 5547bca15..417ddf583 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -772,6 +772,72 @@ CONFIG_NET_RESOLV_ENTRIES=4 CONFIG_FTPD_CMDBUFFERSIZE=2048 # +# CONFIG_MODBUS - General ModBus support +# CONFIG_MB_ASCII_ENABLED - Modbus ASCII support +# CONFIG_MB_RTU_ENABLED - Modbus RTU support +# CONFIG_MB_TCP_ENABLED - Modbus TCP support +# CONFIG_MB_ASCII_TIMEOUT_SEC - Character timeout value for Modbus ASCII. The +# character timeout value is not fixed for Modbus ASCII and is therefore +# a configuration option. It should be set to the maximum expected delay +# time of the network. Default 1 +# CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS - Timeout to wait in ASCII prior +# to enabling transmitter. If defined the function calls +# vMBPortSerialDelay with the argument CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS +# to allow for a delay before the serial transmitter is enabled. This is +# required because some targets are so fast that there is no time between +# receiving and transmitting the frame. If the master is to slow with +# enabling its receiver then he will not receive the response correctly. +# CONFIG_MB_FUNC_HANDLERS_MAX - Maximum number of Modbus functions codes the +# protocol stack should support. The maximum number of supported Modbus +# functions must be greater than the sum of all enabled functions in this +# file and custom function handlers. If set to small adding more functions +# will fail. +# CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF - Number of bytes which should be +# allocated for the Report Slave ID command. This number limits the +# maximum size of the additional segment in the report slave id function. +# See eMBSetSlaveID() for more information on how to set this value. It +# is only used if CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED is set to 1. +# CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED - If the Report Slave ID +# function should be enabled. +# CONFIG_MB_FUNC_READ_INPUT_ENABLED - If the Read Input Registers function +# should be enabled. +# CONFIG_MB_FUNC_READ_HOLDING_ENABLED - If the Read Holding Registers +# function should be enabled. +# CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED - If the Write Single Register +# function should be enabled. +# CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED - If the Write Multiple +# registers function should be enabled. +# CONFIG_MB_FUNC_READ_COILS_ENABLED - If the Read Coils function should +# be enabled. +# CONFIG_MB_FUNC_WRITE_COIL_ENABLED - If the Write Coils function should +# be enabled. +# CONFIG_MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED - If the Write Multiple Coils +# function should be enabled. +# CONFIG_MB_FUNC_READ_DISCRETE_INPUTS_ENABLED - If the Read Discrete Inputs +# function should be enabled. +# CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED - If the Read/Write Multiple +# Registers function should be enabled. +# +CONFIG_MODBUS=n +CONFIG_MB_ASCII_ENABLED=y +CONFIG_MB_RTU_ENABLED=y +CONFIG_MB_TCP_ENABLED=n +CONFIG_MB_ASCII_TIMEOUT_SEC=1 +CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS=0 +CONFIG_MB_FUNC_HANDLERS_MAX=16 +CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF=32 +CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED=y +CONFIG_MB_FUNC_READ_INPUT_ENABLED=y +CONFIG_MB_FUNC_READ_HOLDING_ENABLED=y +CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED=y +CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED=y +CONFIG_MB_FUNC_READ_COILS_ENABLED=y +CONFIG_MB_FUNC_WRITE_COIL_ENABLED=y +CONFIG_MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED=y +CONFIG_MB_FUNC_READ_DISCRETE_INPUTS_ENABLED=y +CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED=y + +# # USB Device Configuration # # CONFIG_USBDEV diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 037a33daf..ddf27ee72 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -742,6 +742,72 @@ CONFIG_NET_RESOLV_ENTRIES=4 CONFIG_FTPD_CMDBUFFERSIZE=2048 # +# CONFIG_MODBUS - General ModBus support +# CONFIG_MB_ASCII_ENABLED - Modbus ASCII support +# CONFIG_MB_RTU_ENABLED - Modbus RTU support +# CONFIG_MB_TCP_ENABLED - Modbus TCP support +# CONFIG_MB_ASCII_TIMEOUT_SEC - Character timeout value for Modbus ASCII. The +# character timeout value is not fixed for Modbus ASCII and is therefore +# a configuration option. It should be set to the maximum expected delay +# time of the network. Default 1 +# CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS - Timeout to wait in ASCII prior +# to enabling transmitter. If defined the function calls +# vMBPortSerialDelay with the argument CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS +# to allow for a delay before the serial transmitter is enabled. This is +# required because some targets are so fast that there is no time between +# receiving and transmitting the frame. If the master is to slow with +# enabling its receiver then he will not receive the response correctly. +# CONFIG_MB_FUNC_HANDLERS_MAX - Maximum number of Modbus functions codes the +# protocol stack should support. The maximum number of supported Modbus +# functions must be greater than the sum of all enabled functions in this +# file and custom function handlers. If set to small adding more functions +# will fail. +# CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF - Number of bytes which should be +# allocated for the Report Slave ID command. This number limits the +# maximum size of the additional segment in the report slave id function. +# See eMBSetSlaveID() for more information on how to set this value. It +# is only used if CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED is set to 1. +# CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED - If the Report Slave ID +# function should be enabled. +# CONFIG_MB_FUNC_READ_INPUT_ENABLED - If the Read Input Registers function +# should be enabled. +# CONFIG_MB_FUNC_READ_HOLDING_ENABLED - If the Read Holding Registers +# function should be enabled. +# CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED - If the Write Single Register +# function should be enabled. +# CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED - If the Write Multiple +# registers function should be enabled. +# CONFIG_MB_FUNC_READ_COILS_ENABLED - If the Read Coils function should +# be enabled. +# CONFIG_MB_FUNC_WRITE_COIL_ENABLED - If the Write Coils function should +# be enabled. +# CONFIG_MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED - If the Write Multiple Coils +# function should be enabled. +# CONFIG_MB_FUNC_READ_DISCRETE_INPUTS_ENABLED - If the Read Discrete Inputs +# function should be enabled. +# CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED - If the Read/Write Multiple +# Registers function should be enabled. +# +CONFIG_MODBUS=n +CONFIG_MB_ASCII_ENABLED=y +CONFIG_MB_RTU_ENABLED=y +CONFIG_MB_TCP_ENABLED=n +CONFIG_MB_ASCII_TIMEOUT_SEC=1 +CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS=0 +CONFIG_MB_FUNC_HANDLERS_MAX=16 +CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF=32 +CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED=y +CONFIG_MB_FUNC_READ_INPUT_ENABLED=y +CONFIG_MB_FUNC_READ_HOLDING_ENABLED=y +CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED=y +CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED=y +CONFIG_MB_FUNC_READ_COILS_ENABLED=y +CONFIG_MB_FUNC_WRITE_COIL_ENABLED=y +CONFIG_MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED=y +CONFIG_MB_FUNC_READ_DISCRETE_INPUTS_ENABLED=y +CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED=y + +# # USB Device Configuration # # CONFIG_USBDEV |