33 #ifndef PERSISTENT_SETTINGS_FILE
34 #define PERSISTENT_SETTINGS_FILE "pprz_persistent_settings.binary"
41 fwrite(ptr, size, 1, file);
57 fseek(file, 0, SEEK_END);
58 if (ftell(file) != size) {
64 fseek(file, 0, SEEK_SET);
65 int bytes_read = fread(ptr, size, 1, file);
66 if (bytes_read != size) {
67 printf(
"Could only read %d of %d bytes from %s!\n", bytes_read, size,
int32_t persistent_write(void *ptr, uint32_t size)
int32_t persistent_read(void *ptr, uint32_t size)
int32_t persistent_clear(void)
#define PERSISTENT_SETTINGS_FILE
Default file used to store persistent settings.
Persistent settings interface.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.