Added extern "C" code necessary for Arduino to compile.