Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdio.h>
#include "maa.h"
* @return maa result type
*/
maa_result_t maa_gpio_write(maa_gpio_context *dev, int value);
+
+#ifdef __cplusplus
+}
+#endif
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
* @param dev the i2c context
*/
void maa_i2c_stop(maa_i2c_context* dev);
+
+#ifdef __cplusplus
+}
+#endif
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
MAA_SUCCESS = 0,
MAA_ERROR_FEATURE_NOT_IMPLEMENTED = 1,
* @return version string from version.h
*/
const char* maa_get_version();
+
+#ifdef __cplusplus
+}
+#endif
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdio.h>
#include <fcntl.h>
/** Close and unexport the PWM pin.
*/
void maa_pwm_close(maa_pwm_context* pwm);
+
+#ifdef __cplusplus
+}
+#endif
)
SET_SOURCE_FILES_PROPERTIES(maajs.i PROPERTIES SWIG_FLAGS "-node")
+SET_SOURCE_FILES_PROPERTIES(maajs.i PROPERTIES CPLUSPLUS ON)
-SWIG_ADD_MODULE(maajs javascript ${maa_LIB_SRCS})
+SWIG_ADD_MODULE(maajs javascript maajs.i ${maa_LIB_SRCS})
SWIG_LINK_LIBRARIES(maajs ${NODE_LIBRARIES})
set_target_properties(maajs PROPERTIES