The .ino
files of Arduino sketches are compiled as C++ after a little bit of preprocessing. If you want to use C functions in C++, you need to wrap their declarations in:
extern "C" {}
There are a couple ways you can do this:
In the sketch:
extern "C" {
#include "SomeCFunctions.h"
}
Or, in the .h file:
#ifdef __cplusplus
extern "C" {
#endif
// C function declarations here
#ifdef __cplusplus
}
#endif