Macros PR_BEGIN_EXTERN_C and PR_END_EXTERN_C were not defined in all contexts. Remove definition and replace with explicit expansion. From Stefan Kolb
This commit is contained in:
parent
84dbf4ee7c
commit
71d944a5d0
@ -1425,4 +1425,6 @@
|
|||||||
first path was not being freed. From Bruno Herrera (2015-08-26).
|
first path was not being freed. From Bruno Herrera (2015-08-26).
|
||||||
* apps/examples/netloop: Add a test of the local loopback device
|
* apps/examples/netloop: Add a test of the local loopback device
|
||||||
(2015-09-02).
|
(2015-09-02).
|
||||||
|
* apps/modbus and apps/include/modbus: Macros PR_BEGIN_EXTERN_C and
|
||||||
|
PR_END_EXTERN_C were not defined in all contexts. Replace with
|
||||||
|
explicit expansion in all cases. From Stefan Kolb (2015-09-03).
|
||||||
|
@ -65,7 +65,8 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbport.h"
|
#include "mbport.h"
|
||||||
@ -431,6 +432,6 @@ eMBErrorCode eMBRegDiscreteCB(uint8_t *pucRegBuffer, uint16_t usAddress,
|
|||||||
uint16_t usNDiscrete);
|
uint16_t usNDiscrete);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,8 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbport.h"
|
#include "mbport.h"
|
||||||
@ -459,7 +460,7 @@ void vMBMasterSetErrorType(eMBMasterErrorEventType errorType);
|
|||||||
eMBMasterReqErrCode eMBMasterWaitRequestFinish(void);
|
eMBMasterReqErrCode eMBMasterWaitRequestFinish(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MB_M_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MB_M_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_INCLUDE_MODBUS_MBFRAME_H
|
#define __APPS_INCLUDE_MODBUS_MBFRAME_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -84,7 +85,7 @@ typedef eMBErrorCode (*peMBFrameSend)(uint8_t slaveAddress,
|
|||||||
typedef void (*pvMBFrameClose)(void);
|
typedef void (*pvMBFrameClose)(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MBFRAME_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MBFRAME_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_INCLUDE_MODBUS_MBFUNC_H
|
#define __APPS_INCLUDE_MODBUS_MBFUNC_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -81,7 +82,7 @@ eMBException eMBFuncReadWriteMultipleHoldingRegister(uint8_t *pucFrame, uint16_t
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MBFUNC_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MBFUNC_H */
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -185,7 +186,7 @@ bool xMBTCPPortSendResponse(const uint8_t *pucMBTCPFrame, uint16_t usTCPLength);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MBPORT_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MBPORT_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_INCLUDE_MODBUS_MBPROTO_H
|
#define __APPS_INCLUDE_MODBUS_MBPROTO_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -87,7 +88,7 @@ typedef struct
|
|||||||
} xMBFunctionHandler;
|
} xMBFunctionHandler;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MBPROTO_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MBPROTO_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_INCLUDE_MODBUS_MBUTILS_H
|
#define __APPS_INCLUDE_MODBUS_MBUTILS_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -104,7 +105,7 @@ void xMBUtilSetBits(uint8_t *ucByteBuf, uint16_t usBitOffset,
|
|||||||
uint8_t xMBUtilGetBits(uint8_t *ucByteBuf, uint16_t usBitOffset, uint8_t ucNBits);
|
uint8_t xMBUtilGetBits(uint8_t *ucByteBuf, uint16_t usBitOffset, uint8_t ucNBits);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_INCLUDE_MODBUS_MBUTILS_H */
|
#endif /* __APPS_INCLUDE_MODBUS_MBUTILS_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_MODBUS_ASCII_MBASCII_H
|
#define __APPS_MODBUS_ASCII_MBASCII_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -55,7 +56,7 @@ bool xMBASCIITimerT1SExpired(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_MODBUS_ASCII_MBASCII_H */
|
#endif /* __APPS_MODBUS_ASCII_MBASCII_H */
|
||||||
|
@ -44,14 +44,13 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define INLINE
|
|
||||||
#define PR_BEGIN_EXTERN_C extern "C" {
|
|
||||||
#define PR_END_EXTERN_C }
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define INLINE
|
||||||
|
|
||||||
#define ENTER_CRITICAL_SECTION( ) vMBPortEnterCritical()
|
#define ENTER_CRITICAL_SECTION( ) vMBPortEnterCritical()
|
||||||
#define EXIT_CRITICAL_SECTION( ) vMBPortExitCritical()
|
#define EXIT_CRITICAL_SECTION( ) vMBPortExitCritical()
|
||||||
|
|
||||||
@ -88,7 +87,7 @@ bool xMBPortSerialPoll(void);
|
|||||||
bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs);
|
bool xMBPortSerialSetTimeout(uint32_t dwTimeoutMs);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_MODBUS_NUTTX_PORT_H */
|
#endif /* __APPS_MODBUS_NUTTX_PORT_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_MODBUS_RTU_MBRTU_H
|
#define __APPS_MODBUS_RTU_MBRTU_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -68,7 +69,7 @@ bool xMBMasterRTUTimerExpired(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_MODBUS_RTU_MBRTU_H */
|
#endif /* __APPS_MODBUS_RTU_MBRTU_H */
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
#define __APPS_MODBUS_TCP_MBTCP_H
|
#define __APPS_MODBUS_TCP_MBTCP_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_BEGIN_EXTERN_C
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -55,7 +56,7 @@ eMBErrorCode eMBTCPSend(uint8_t _unused, const uint8_t *pucFrame,
|
|||||||
uint16_t usLength);
|
uint16_t usLength);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
PR_END_EXTERN_C
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __APPS_MODBUS_TCP_MBTCP_H */
|
#endif /* __APPS_MODBUS_TCP_MBTCP_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user