From e61d1595ebb1fa76b499cddec2df4bd66ec92b97 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Mon, 20 May 2024 20:02:47 +0800
Subject: [PATCH] 继续完善

---
 Function/modbus/rtu/mbrtu.h |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/Soft/mbcrc.h b/Function/modbus/rtu/mbrtu.h
similarity index 69%
copy from Soft/mbcrc.h
copy to Function/modbus/rtu/mbrtu.h
index a2674cb..6981687 100644
--- a/Soft/mbcrc.h
+++ b/Function/modbus/rtu/mbrtu.h
@@ -27,11 +27,24 @@
  *
  */
 
-#ifndef _MB_CRC_H
-#define _MB_CRC_H
+#ifndef _MB_RTU_H
+#define _MB_RTU_H
 
-#include "port.h"
+#ifdef __cplusplus
+PR_BEGIN_EXTERN_C
+#endif
+    eMBErrorCode eMBRTUInit( UCHAR slaveAddress, UCHAR ucPort, ULONG ulBaudRate,
+                             eMBParity eParity );
+void            eMBRTUStart( void );
+void            eMBRTUStop( void );
+eMBErrorCode    eMBRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLength );
+eMBErrorCode    eMBRTUSend( UCHAR slaveAddress, const UCHAR * pucFrame, USHORT usLength );
+BOOL            xMBRTUReceiveFSM( void );
+BOOL            xMBRTUTransmitFSM( void );
+BOOL            xMBRTUTimerT15Expired( void );
+BOOL            xMBRTUTimerT35Expired( void );
 
-USHORT          usMBCRC16(USHORT usInit, UCHAR * pucFrame, ULONG usLen );
-
+#ifdef __cplusplus
+PR_END_EXTERN_C
+#endif
 #endif

--
Gitblit v1.9.3