PandA-2024.02
checksum.c
Go to the documentation of this file.
1 #include <stdint.h>
2 
3 #include "checksum.h"
4 
5 uint8_t checksum(uint64_t in1, uint64_t in2)
6 {
7  uint8_t sum = 0;
8  for (int i = 0; i < sizeof(uint64_t); i++)
9  {
10  uint8_t a = (in1 >> (8*i)) & 0xFF;
11  uint8_t b = (in2 >> (8*i)) & 0xFF;
12  sum += a + b;
13  }
14  return sum;
15 }
uint8_t checksum(uint64_t in1, uint64_t in2)
Definition: checksum.c:5
int sum
Definition: dotproduct.h:3

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13