Add missing extern "C" statements
Convert data source adress type to void *

This should be the standard, as done for example in memcpy(3).
Add flash writing mocks