Modbus: Change to more header files to make them a little more consistent with Nuttx coding stanards. Still not very close
This commit is contained in:
parent
af7f087ccf
commit
b1151ef033
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/include/modbus/mbproto.h
|
||||
*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
/****************************************************************************
|
||||
* apps/modbus/ascii/mbascii.h
|
||||
*
|
||||
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -25,32 +27,35 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* File: $Id: mbascii.h,v 1.8 2006/12/07 22:10:34 wolti Exp $
|
||||
*/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _MB_ASCII_H
|
||||
#define _MB_ASCII_H
|
||||
#ifndef __APPS_MODBUS_ASCII_MBASCII_H
|
||||
#define __APPS_MODBUS_ASCII_MBASCII_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
PR_BEGIN_EXTERN_C
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MB_ASCII_ENABLED
|
||||
eMBErrorCode eMBASCIIInit( uint8_t slaveAddress, uint8_t ucPort,
|
||||
speed_t ulBaudRate, eMBParity eParity );
|
||||
void eMBASCIIStart( void );
|
||||
void eMBASCIIStop( void );
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
eMBErrorCode eMBASCIIReceive( uint8_t * pucRcvAddress, uint8_t ** pucFrame,
|
||||
uint16_t * pusLength );
|
||||
eMBErrorCode eMBASCIISend( uint8_t slaveAddress, const uint8_t * pucFrame,
|
||||
uint16_t usLength );
|
||||
bool xMBASCIIReceiveFSM( void );
|
||||
bool xMBASCIITransmitFSM( void );
|
||||
bool xMBASCIITimerT1SExpired( void );
|
||||
#ifdef CONFIG_MB_ASCII_ENABLED
|
||||
eMBErrorCode eMBASCIIInit(uint8_t slaveAddress, uint8_t ucPort,
|
||||
speed_t ulBaudRate, eMBParity eParity);
|
||||
void eMBASCIIStart(void);
|
||||
void eMBASCIIStop(void);
|
||||
eMBErrorCode eMBASCIIReceive(uint8_t *pucRcvAddress, uint8_t **pucFrame,
|
||||
uint16_t * pusLength);
|
||||
eMBErrorCode eMBASCIISend(uint8_t slaveAddress, const uint8_t *pucFrame,
|
||||
uint16_t usLength);
|
||||
bool xMBASCIIReceiveFSM(void);
|
||||
bool xMBASCIITransmitFSM(void);
|
||||
bool xMBASCIITimerT1SExpired(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
PR_END_EXTERN_C
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_MODBUS_ASCII_MBASCII_H */
|
||||
|
@ -1,6 +1,7 @@
|
||||
/****************************************************************************
|
||||
* apps/modbus/nuttx/port.h
|
||||
*
|
||||
* FreeModbus Libary: NuttX Port
|
||||
* FreeModbus Library: NuttX Port
|
||||
* Based on the FreeModbus Linux port by:
|
||||
*
|
||||
* Copyright (C) 2006 Christian Walter <wolti@sil.at>
|
||||
@ -73,8 +74,8 @@ typedef enum
|
||||
|
||||
void vMBPortEnterCritical(void);
|
||||
void vMBPortExitCritical(void);
|
||||
void vMBPortLog(eMBPortLogLevel eLevel, const char * szModule,
|
||||
const char * szFmt, ...);
|
||||
void vMBPortLog(eMBPortLogLevel eLevel, const char *szModule,
|
||||
const char *szFmt, ...);
|
||||
void vMBPortTimerPoll(void);
|
||||
bool xMBPortSerialPoll(void);
|
||||
bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs);
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
/****************************************************************************
|
||||
* apps/modutils/rtu/mbcrc.h
|
||||
*
|
||||
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -25,12 +27,15 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* File: $Id: mbcrc.h,v 1.5 2006/12/07 22:10:34 wolti Exp $
|
||||
*/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _MB_CRC_H
|
||||
#define _MB_CRC_H
|
||||
#ifndef __APPS_MODBUS_RTU_MBCRC_H
|
||||
#define __APPS_MODBUS_RTU_MBCRC_H
|
||||
|
||||
uint16_t usMBCRC16( uint8_t * pucFrame, uint16_t usLen );
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif
|
||||
uint16_t usMBCRC16(uint8_t *pucFrame, uint16_t usLen);
|
||||
|
||||
#endif /* __APPS_MODBUS_RTU_MBCRC_H */
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
/****************************************************************************
|
||||
* apps/modbus/rtu/mbrtu.h
|
||||
*
|
||||
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -25,27 +27,34 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* File: $Id: mbrtu.h,v 1.9 2006/12/07 22:10:34 wolti Exp $
|
||||
*/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _MB_RTU_H
|
||||
#define _MB_RTU_H
|
||||
#ifndef __APPS_MODBUS_RTU_MBRTU_H
|
||||
#define __APPS_MODBUS_RTU_MBRTU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
PR_BEGIN_EXTERN_C
|
||||
#endif
|
||||
eMBErrorCode eMBRTUInit( uint8_t slaveAddress, uint8_t ucPort, speed_t ulBaudRate,
|
||||
eMBParity eParity );
|
||||
void eMBRTUStart( void );
|
||||
void eMBRTUStop( void );
|
||||
eMBErrorCode eMBRTUReceive( uint8_t * pucRcvAddress, uint8_t ** pucFrame, uint16_t * pusLength );
|
||||
eMBErrorCode eMBRTUSend( uint8_t slaveAddress, const uint8_t * pucFrame, uint16_t usLength );
|
||||
bool xMBRTUReceiveFSM( void );
|
||||
bool xMBRTUTransmitFSM( void );
|
||||
bool xMBRTUTimerT15Expired( void );
|
||||
bool xMBRTUTimerT35Expired( void );
|
||||
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
eMBErrorCode eMBRTUInit(uint8_t slaveAddress, uint8_t ucPort,
|
||||
speed_t ulBaudRate, eMBParity eParity);
|
||||
void eMBRTUStart(void);
|
||||
void eMBRTUStop(void);
|
||||
eMBErrorCode eMBRTUReceive(uint8_t *pucRcvAddress, uint8_t **pucFrame,
|
||||
uint16_t *pusLength);
|
||||
eMBErrorCode eMBRTUSend(uint8_t slaveAddress, const uint8_t *pucFrame,
|
||||
uint16_t usLength);
|
||||
bool xMBRTUReceiveFSM(void);
|
||||
bool xMBRTUTransmitFSM(void);
|
||||
bool xMBRTUTimerT15Expired(void);
|
||||
bool xMBRTUTimerT35Expired(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
PR_END_EXTERN_C
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_MODBUS_RTU_MBRTU_H */
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*
|
||||
/****************************************************************************
|
||||
* apps/modbus/tcp/mbtcp.h
|
||||
*
|
||||
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
|
||||
* Copyright (c) 2006 Christian Walter <wolti@sil.at>
|
||||
* All rights reserved.
|
||||
@ -30,14 +32,14 @@
|
||||
#ifndef __APPS_MODBUS_TCP_MBTCP_H
|
||||
#define __APPS_MODBUS_TCP_MBTCP_H
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
PR_BEGIN_EXTERN_C
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define MB_TCP_PSEUDO_ADDRESS 255
|
||||
|
||||
/****************************************************************************
|
||||
@ -55,4 +57,5 @@ eMBErrorCode eMBTCPSend(uint8_t _unused, const uint8_t *pucFrame,
|
||||
#ifdef __cplusplus
|
||||
PR_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_MODBUS_TCP_MBTCP_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user