forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

jinlicong
2024-05-20 e61d1595ebb1fa76b499cddec2df4bd66ec92b97
Function/modbus/rtu/mbrtu.h
copy from Soft/mbcrc.h copy to Function/modbus/rtu/mbrtu.h
File was copied from Soft/mbcrc.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