91 uint32_t storeChksum = 0, recordSize;
92 const uint32_t *initialBufPtr = *eeprom_buffer;
102 const size_t chksumBufLen = *eeprom_buffer - initialBufPtr;
106 if (calcChksum != storeChksum) {
115 if (*eeprom_buffer == NULL) {
119 *sca = *(*eeprom_buffer)++;
127 if (*eeprom_buffer == NULL) {
132 if (num_of_array == NULL) {
136 if (num_of_elem == NULL) {
142 float **eeprom_buffer_float = (
float **) eeprom_buffer;
145 "sizeof (uint32_t) differ from sizeof (mtostk_time_t)");
146 _Static_assert(
sizeof(
uint32_t) ==
sizeof(
float),
147 "sizeof (uint32_t) differ from sizeof (float)");
149 *num_of_array = *(*eeprom_buffer)++;
154 for (
size_t idx = 0;
idx < *num_of_array;
idx++) {
155 const size_t this_num_of_elem = *(*eeprom_buffer)++;
156 if (*num_of_elem == 0) {
157 *num_of_elem = this_num_of_elem;
159 if (*num_of_elem != this_num_of_elem) {
168 for (
int32_t jdx = 0; jdx < *num_of_elem; jdx++) {
179 if (*eeprom_buffer == NULL) {
183 const size_t numOfArrays = *(*eeprom_buffer)++;
184 if (numOfArrays > 1) {
188 const size_t numOfElems = *(*eeprom_buffer)++;
194 *str++ = *(*eeprom_buffer_byte)++;
204 if (*eeprom_buffer == NULL) {
208 const size_t numOfArrays = *(*eeprom_buffer)++;
213 for (
size_t i = 0; i < numOfArrays; i++) {
214 const size_t numOfElems = *(*eeprom_buffer)++;
218 *eeprom_buffer_byte += numOfElems * dataSize;
228 *eeprom_buffer_byte += dataSize;
238 uint32_t sum1 = 0xffff, sum2 = 0xffff;
244 sum2 += sum1 += *data++;
246 sum1 = (sum1 & 0xffff) + (sum1 >> 16);
247 sum2 = (sum2 & 0xffff) + (sum2 >> 16);
250 sum1 = (sum1 & 0xffff) + (sum1 >> 16);
251 sum2 = (sum2 & 0xffff) + (sum2 >> 16);
252 return sum2 << 16 | sum1;
259 for (i = 1; i < num_coef; i++) {
260 y += coeffs[i] * powf(value, (
float) i);
281 if (temp <= params->temps[0]) {
287 for (i = 0; i <= params->
num_temp - 2; i++) {
288 const float t1 = params->
temps[i];
289 const float t2 = params->
temps[i + 1];
290 if (temp > t1 && temp <= t2) {
294 const float alpha = (t2 - temp) / (t2 - t1);