Add project files.

This commit is contained in:
2022-09-05 13:51:05 +10:00
parent 727c68ea6c
commit 62cdc57333
262 changed files with 82611 additions and 0 deletions

19
espReader/msh.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <stdint.h>
#define CAT2(x, y) x##y
#define CAT(x, y) CAT2(x, y)
// hashes in universally into l (<= num bits in TYPE) bits using odd seed
#define MSH(TYPE) \
inline TYPE CAT(TYPE, _msh) (TYPE in, TYPE bits, TYPE seed) { \
return (seed * in) >> ((sizeof( TYPE ) * 8) - bits); \
}
// hashes for all of the standard sizes
MSH(uint8_t)
MSH(uint16_t)
MSH(uint32_t)
MSH(uint64_t)