diff --git a/dynamixel_base/include/dynamixel.h b/dynamixel_base/include/dynamixel.h index 802189f3d4b26142431ed10c6c535c549de8575c..9623b1d9f59d05a25ab4c8c7a72ea682b18bb17a 100755 --- a/dynamixel_base/include/dynamixel.h +++ b/dynamixel_base/include/dynamixel.h @@ -1,6 +1,10 @@ #ifndef _DYNAMIXEL_H #define _DYNAMIXEL_H +#ifdef __cplusplus +extern "C" { +#endif + #include "dynamixel_common.h" #define DYN_HEADER_OFF 0 @@ -223,4 +227,8 @@ inline unsigned char dyn_get_read_status_id(unsigned char *packet) return packet[DYN_ID_OFF]; } +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_base/include/dynamixel2.h b/dynamixel_base/include/dynamixel2.h index 81046051606138c7589d56fff22308b4e9289830..2b69fd23337fe9c0719fa52c0723e1e59956c25f 100644 --- a/dynamixel_base/include/dynamixel2.h +++ b/dynamixel_base/include/dynamixel2.h @@ -1,6 +1,10 @@ #ifndef _DYNAMIXEL2_H #define _DYNAMIXEL2_H +#ifdef __cplusplus +extern "C" { +#endif + #include "dynamixel_common.h" #define DYN2_HEADER_OFF 0 @@ -246,4 +250,8 @@ inline unsigned char dyn2_get_read_status_id(unsigned char *packet) return packet[DYN2_ID_OFF]; } +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_base/include/dynamixel_master.h b/dynamixel_base/include/dynamixel_master.h index d88a46f0f077b9095a75592f41abd7554f14b87b..2a726aa71c8abef9aed0436eedec624cbf3bbe9d 100644 --- a/dynamixel_base/include/dynamixel_master.h +++ b/dynamixel_base/include/dynamixel_master.h @@ -1,6 +1,10 @@ #ifndef _DYNAMIXEL_MASTER_H #define _DYNAMIXEL_MASTER_H +#ifdef __cplusplus +extern "C" { +#endif + #include "comm.h" #include "dynamixel.h" #include "dynamixel2.h" @@ -197,4 +201,8 @@ unsigned char dyn_master_bulk_write(TDynamixelMaster *master,unsigned char num,u */ unsigned char dyn_master_relay(TDynamixelMaster *master,unsigned char *inst_pkt,unsigned char *status_pkt); +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_base/include/dynamixel_slave.h b/dynamixel_base/include/dynamixel_slave.h index 6d92d9fa513ba7c6fd6a64a628b4775a485b68ab..39a1a553a49390a94effa754d7f529cf85314fcb 100644 --- a/dynamixel_base/include/dynamixel_slave.h +++ b/dynamixel_base/include/dynamixel_slave.h @@ -1,6 +1,10 @@ #ifndef _DYNAMIXEL_SLAVE_H #define _DYNAMIXEL_SLAVE_H +#ifdef __cplusplus +extern "C" { +#endif + #include "comm.h" #include "dynamixel.h" #include "dynamixel2.h" @@ -164,4 +168,8 @@ inline void dyn_slave_stop(TDynamixelSlave *slave) scheduler_disable_channel(slave->scheduler,slave->sch_channel); } +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_base/include/dynamixel_slave_device.h b/dynamixel_base/include/dynamixel_slave_device.h index 76e3540d87e58c2660dcf68fe50252f0c73e7dd8..f1f0deb334ab6242607a732a2d7b70130bf9d2be 100644 --- a/dynamixel_base/include/dynamixel_slave_device.h +++ b/dynamixel_base/include/dynamixel_slave_device.h @@ -1,6 +1,10 @@ #ifndef _DYNAMIXEL_SLAVE_DEVICE_H #define _DYNAMIXEL_SLAVE_DEVICE_H +#ifdef __cplusplus +extern "C" { +#endif + #include "dynamixel_slave_registers.h" #include "dynamixel.h" #include "dynamixel2.h" @@ -203,4 +207,8 @@ inline TMemory *dyn_slave_device_get_memory(TDynamixelSlaveDevice *device) return &device->memory; } +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_manager/include/dyn_manager.h b/dynamixel_manager/include/dyn_manager.h index b5c8cff1085b6254a1b1b635de67f422e1b78287..948c040cb0bb4e0ae4dd4083bc276cc1881fd925 100644 --- a/dynamixel_manager/include/dyn_manager.h +++ b/dynamixel_manager/include/dyn_manager.h @@ -1,6 +1,10 @@ #ifndef _DYN_MANAGER_H #define _DYN_MANAGER_H +#ifdef __cplusplus +extern "C" { +#endif + #include "dyn_manager_registers.h" #include "dynamixel_master.h" #include "memory.h" @@ -157,4 +161,8 @@ void dyn_manager_bulk_op_change_length(TDynManager *manager,OP_HANDLE *op,unsign void dyn_manager_bulk_op_change_data(TDynManager *manager,OP_HANDLE *op,unsigned char num,unsigned char *ids,unsigned char * const data[]); void dyn_manager_loop(TDynManager *manager); +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_manager/include/dyn_module.h b/dynamixel_manager/include/dyn_module.h index a79d6c6a7669d5c3a3405ac8d2546fb08e2a3ff9..77c5ce1e462af9ce4fb367b943413377732c401a 100644 --- a/dynamixel_manager/include/dyn_module.h +++ b/dynamixel_manager/include/dyn_module.h @@ -1,6 +1,10 @@ #ifndef _DYN_MODULE_H #define _DYN_MODULE_H +#ifdef __cplusplus +extern "C" { +#endif + #ifndef MODULE_MAX_NUM_MODELS #error "Please, specify the maximum number of dynamixel master modules with the MODULE_MAX_NUM_MODELS macro" #endif @@ -38,4 +42,8 @@ unsigned char dyn_module_device_is_assigned(TDynModule *module,unsigned char id) void dyn_module_set_period(TDynModule *module,unsigned char period); inline unsigned char dyn_module_get_period(TDynModule *module); +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_manager/include/modules/motion_manager.h b/dynamixel_manager/include/modules/motion_manager.h index 1a2e9aa525ec2a72902713300277b41e484ca573..7ebf98851692aa2f1eae350e0e8c9b33f4cb9db4 100644 --- a/dynamixel_manager/include/modules/motion_manager.h +++ b/dynamixel_manager/include/modules/motion_manager.h @@ -1,6 +1,10 @@ #ifndef _MOTION_MANAGER_H #define _MOTION_MANAGER_H +#ifdef __cplusplus +extern "C" { +#endif + #include "dyn_module.h" #ifndef MM_MAX_NUM_MOTION_MODULES @@ -64,4 +68,8 @@ unsigned char mmanager_is_servo_enabled(TMotionManager *mmanager,unsigned char s void mmanager_set_offset(TMotionManager *mmanager,unsigned char servo_id,char offset); void mmanager_add_module(TMotionManager *mmanager,struct TMotionModule *module); +#ifdef __cplusplus + } +#endif + #endif diff --git a/dynamixel_manager/include/modules/motion_module.h b/dynamixel_manager/include/modules/motion_module.h index bb4c6136e19f3992691d9fdf120627bfedd99aed..9498d5411c91ed6d61991c24e623ecb7966302ae 100644 --- a/dynamixel_manager/include/modules/motion_module.h +++ b/dynamixel_manager/include/modules/motion_module.h @@ -1,6 +1,10 @@ #ifndef _MOTION_MODULE_H #define _MOTION_MODULE_H +#ifdef __cplusplus +extern "C" { +#endif + #include "motion_manager.h" typedef struct TMotionModule{ @@ -15,4 +19,8 @@ typedef struct TMotionModule{ void mmodule_init(TMotionModule *module); +#ifdef __cplusplus + } +#endif + #endif