Since we are using C++, C code has to be marked as 'extern C' for it to compile. This is now also done for I2C.