Browse Source

Place MODBUS_END_DECLS after including backend header files

All declarations in modbus-rtu.h and modbus-tcp.h should be inside
MODBUS_BEGIN_DECLS and MODBUS_END_DECLS in order to make that functions
properly accessible in C++ files.

Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Tobias Doerffel 15 năm trước cách đây
mục cha
commit
72de18bc67
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/modbus.h

+ 2 - 2
src/modbus.h

@@ -193,9 +193,9 @@ uint8_t modbus_get_byte_from_bits(const uint8_t *src, int address, unsigned int
 float modbus_get_float(const uint16_t *src);
 void modbus_set_float(float real, uint16_t *dest);
 
-MODBUS_END_DECLS
-
 #include "modbus-tcp.h"
 #include "modbus-rtu.h"
 
+MODBUS_END_DECLS
+
 #endif  /* _MODBUS_H_ */