2020-12-28 23:17:54 -05:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
if(${target} STREQUAL "esp32c3")
|
|
|
|
return() # TODO ESP32-C3 IDF-2173
|
|
|
|
endif()
|
|
|
|
|
2018-06-28 11:45:41 -04:00
|
|
|
# The following five lines of boilerplate have to be in your project's
|
|
|
|
# CMakeLists in this exact order for cmake to work correctly
|
2020-07-21 12:34:04 -04:00
|
|
|
set(srcs
|
2019-06-21 02:29:32 -04:00
|
|
|
"common/esp_modbus_master.c"
|
2019-04-28 03:38:23 -04:00
|
|
|
"common/esp_modbus_slave.c"
|
|
|
|
"modbus/mb.c"
|
|
|
|
"modbus/mb_m.c"
|
|
|
|
"modbus/ascii/mbascii.c"
|
2019-11-26 00:16:25 -05:00
|
|
|
"modbus/ascii/mbascii_m.c"
|
2019-04-28 03:38:23 -04:00
|
|
|
"modbus/rtu/mbrtu_m.c"
|
|
|
|
"modbus/rtu/mbrtu.c"
|
|
|
|
"modbus/rtu/mbcrc.c"
|
|
|
|
"modbus/tcp/mbtcp.c"
|
2020-07-21 12:34:04 -04:00
|
|
|
"modbus/tcp/mbtcp_m.c"
|
2019-04-28 03:38:23 -04:00
|
|
|
"port/port.c"
|
|
|
|
"port/portevent.c"
|
|
|
|
"port/portevent_m.c"
|
|
|
|
"port/portother.c"
|
|
|
|
"port/portother_m.c"
|
|
|
|
"port/portserial.c"
|
|
|
|
"port/portserial_m.c"
|
|
|
|
"port/porttimer.c"
|
|
|
|
"port/porttimer_m.c"
|
|
|
|
"modbus/functions/mbfunccoils.c"
|
|
|
|
"modbus/functions/mbfunccoils_m.c"
|
|
|
|
"modbus/functions/mbfuncdiag.c"
|
|
|
|
"modbus/functions/mbfuncdisc.c"
|
|
|
|
"modbus/functions/mbfuncdisc_m.c"
|
|
|
|
"modbus/functions/mbfuncholding.c"
|
|
|
|
"modbus/functions/mbfuncholding_m.c"
|
|
|
|
"modbus/functions/mbfuncinput.c"
|
|
|
|
"modbus/functions/mbfuncinput_m.c"
|
|
|
|
"modbus/functions/mbfuncother.c"
|
|
|
|
"modbus/functions/mbutils.c"
|
|
|
|
"serial_slave/modbus_controller/mbc_serial_slave.c"
|
2020-07-21 12:34:04 -04:00
|
|
|
"serial_master/modbus_controller/mbc_serial_master.c"
|
|
|
|
"tcp_slave/port/port_tcp_slave.c"
|
|
|
|
"tcp_slave/modbus_controller/mbc_tcp_slave.c"
|
|
|
|
"tcp_master/modbus_controller/mbc_tcp_master.c"
|
|
|
|
"tcp_master/port/port_tcp_master.c"
|
|
|
|
"common/esp_modbus_master_tcp.c"
|
|
|
|
"common/esp_modbus_slave_tcp.c"
|
|
|
|
"common/esp_modbus_master_serial.c"
|
|
|
|
"common/esp_modbus_slave_serial.c")
|
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
set(include_dirs common/include)
|
2020-07-21 12:34:04 -04:00
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
set(priv_include_dirs common port modbus modbus/ascii modbus/functions
|
2018-10-19 09:51:27 -04:00
|
|
|
modbus/rtu modbus/tcp modbus/include)
|
2020-07-21 12:34:04 -04:00
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
list(APPEND priv_include_dirs serial_slave/port serial_slave/modbus_controller
|
2020-07-21 12:34:04 -04:00
|
|
|
serial_master/port serial_master/modbus_controller
|
|
|
|
tcp_slave/port tcp_slave/modbus_controller
|
|
|
|
tcp_master/port tcp_master/modbus_controller)
|
2018-06-28 11:45:41 -04:00
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
|
|
|
REQUIRES driver)
|