This commit is contained in:
claw committed 2026-04-03 16:45:01 +08:00
1 parent 4e80a72d24
commit 9f3b8cf65a
24 files changed
+619 -3018

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
/**
* @file modbustcpslave.h
* @brief Modbus TCP从站服务头文件
*/
#ifndef MODBUSTCPSLAVE_H
#define MODBUSTCPSLAVE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#ifndef DATA_BUF_SIZE
#define DATA_BUF_SIZE 2048
#endif
// ============================================================================
// 接口函数
// ============================================================================
/**
* @brief Modbus TCP服务主函数,W5500socket主循环处理
* @param sn: socket编号
* @param port: 监听端口 (通常502)
* @return 0/正表示正常,负表示错误
*/
int32_t loopback_tcps_modbus(uint8_t sn, uint16_t port);
void update_modbusTCP_timeout();
#ifdef __cplusplus
}
#endif
#endif