add interpolation on cal

This commit is contained in:
TT 2017-09-15 22:13:17 +09:00
parent 0ce695b886
commit 774a11ae74
5 changed files with 90 additions and 4 deletions

14
flash.c
View file

@ -195,6 +195,20 @@ caldata_recall(int id)
return 0;
}
const properties_t *
caldata_ref(int id)
{
const properties_t *src;
if (id < 0 || id >= SAVEAREA_MAX)
return NULL;
src = (const properties_t*)saveareas[id];
if (src->magic != CONFIG_MAGIC)
return NULL;
if (checksum(src, sizeof(properties_t)) != 0)
return NULL;
return src;
}
const uint32_t save_config_prop_area_size = 0x8000;