diff --git a/examples/osd/opentrigger-board/sketch.h b/examples/osd/opentrigger-board/sketch.h index 383b1ec7f..5616a1651 100644 --- a/examples/osd/opentrigger-board/sketch.h +++ b/examples/osd/opentrigger-board/sketch.h @@ -1,6 +1,9 @@ #ifndef __SKETCH_h__ #define __SKETCH_h__ +#ifdef __cplusplus +extern "C" +#endif int color_rgb_from_string (const char *r, const char *g, const char *b); #endif diff --git a/examples/osd/opentrigger-board/sketch.pde b/examples/osd/opentrigger-board/sketch.pde index 9bf39fc2b..a4b1d3767 100755 --- a/examples/osd/opentrigger-board/sketch.pde +++ b/examples/osd/opentrigger-board/sketch.pde @@ -76,8 +76,8 @@ color_from_string (const char *name, const char *uri, const char *s) leds.setColorRGB(0,color_rgb [0], color_rgb [1], color_rgb [2]); return 0; } - -int + +extern "C" int color_rgb_from_string (const char *r, const char *g, const char *b) { color_rgb [0] = atoi (r);