bugfix linker problem mix c cpp function

This commit is contained in:
Harald Pichler 2016-11-03 16:20:22 +01:00
parent 5ea437c170
commit d66e402cad
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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);