1 Star 0 Fork 28

zx2591/freemodbus

forked from felix_tao/freemodbus 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SConscript 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
guozhanxin 提交于 2019-06-24 13:37 . add first version.
Import('RTT_ROOT')
from building import *
src = Split("""
modbus/functions/mbfuncdiag.c
modbus/functions/mbutils.c
modbus/functions/mbfuncother.c
modbus/rtu/mbcrc.c
port/port.c
""")
master_rtu_src = Split("""
modbus/functions/mbfunccoils_m.c
modbus/functions/mbfuncdisc_m.c
modbus/functions/mbfuncholding_m.c
modbus/functions/mbfuncinput_m.c
modbus/rtu/mbrtu_m.c
modbus/mb_m.c
port/portevent_m.c
port/portserial_m.c
port/porttimer_m.c
port/user_mb_app_m.c
""")
slave_src = Split("""
modbus/functions/mbfunccoils.c
modbus/functions/mbfuncdisc.c
modbus/functions/mbfuncholding.c
modbus/functions/mbfuncinput.c
modbus/mb.c
port/portevent.c
port/portserial.c
port/porttimer.c
port/user_mb_app.c
""")
# The set of source files associated with this SConscript file.
path = [GetCurrentDir() + '/modbus/include',
GetCurrentDir() + '/modbus/rtu',
GetCurrentDir() + '/modbus/ascii',
GetCurrentDir() + '/port']
if GetDepend(['PKG_MODBUS_MASTER_RTU']):
src += master_rtu_src
if GetDepend(['PKG_MODBUS_SLAVE']):
src += slave_src
if GetDepend(['PKG_MODBUS_SLAVE_RTU']):
src += ['modbus/rtu/mbrtu.c']
if GetDepend(['PKG_MODBUS_SLAVE_ASCII']):
src += ['modbus/ascii/mbascii.c']
src += ['modbus/rtu/mbrtu.c']
if GetDepend(['PKG_MODBUS_MASTER_SAMPLE']):
src += ['samples/sample_mb_master.c']
if GetDepend(['PKG_MODBUS_SLAVE_SAMPLE']):
src += ['samples/sample_mb_slave.c']
group = DefineGroup('FreeModbus', src, depend = ['PKG_USING_FREEMODBUS'], CPPPATH = path)
Return('group')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zx2591/freemodbus.git
git@gitee.com:zx2591/freemodbus.git
zx2591
freemodbus
freemodbus
master

搜索帮助