This does not currently compile. There is an include file issue and int32_t is not defined even though stdint.h is included before its use.