bootloaderShared.c
Go to the documentation of this file.
1 #include "bootloaderShared.h"
2 #include <string.h>
3 
4 #define BOOTLOADER_HASH_MIXER 0x5bd1e995
5 #define BOOTLOADER_HASH_SHIFTER 24
6 
7 // calculate bootloader hash code over a set of data
8 uint32_t calculateBootloaderHashCode(uint32_t hashCode, const uint32_t* start, const uint32_t* end)
9 {
10  uint32_t value;
11  while (start < end)
12  {
13  value = *start++;
14  value *= BOOTLOADER_HASH_MIXER;
15  value ^= value >> BOOTLOADER_HASH_SHIFTER;
16  value *= BOOTLOADER_HASH_MIXER;
17  hashCode *= BOOTLOADER_HASH_MIXER;
18  hashCode ^= value;
19  }
20  return hashCode;
21 }
uint32_t calculateBootloaderHashCode(uint32_t hashCode, const uint32_t *start, const uint32_t *end)
not_this_one end(...)
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3589
#define BOOTLOADER_HASH_MIXER
#define BOOTLOADER_HASH_SHIFTER


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:18:13