arduino-serial
arduino-serial copied to clipboard
Compilation on c++
Sorry to border you here, while you lib works amazingly well, it has a small compilation problem if you compile on a c++ code/compiler. May a suggest to warp the function signatures around a:
ifdef __cplusplus
extern "C" {
endif
. . .
ifdef __cplusplus
}
endif
Except for that, your library is perfect and really solved my serial communication problems with Arduino, so thank you for that.
PS: without the extern "C", the code will not compile/link, but the proposed solution removes all the problems
I don't think it is necessary. Just include the headers in your main.hpp like that:
extern "C" {
#include "arduino-serial-lib.h"
}