more code
This commit is contained in:
26
code/Core/Inc/crc.h
Normal file
26
code/Core/Inc/crc.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* crc.h
|
||||
*
|
||||
* Created on: 19 Dec 2025
|
||||
* Author: janik
|
||||
*/
|
||||
|
||||
#ifndef INC_CRC_H_
|
||||
#define INC_CRC_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t crc;
|
||||
} CRC8_107;
|
||||
|
||||
static inline void CRC8_107_init(CRC8_107 *ctx)
|
||||
{
|
||||
ctx->crc = 0x0u;
|
||||
}
|
||||
|
||||
void CRC8_107_add(CRC8_107 *ctx, uint8_t data);
|
||||
uint8_t CRC8_107_getChecksum(const CRC8_107 *ctx);
|
||||
|
||||
#endif /* INC_CRC_H_ */
|
||||
Reference in New Issue
Block a user