summaryrefslogtreecommitdiff
path: root/src/voltronic/crc.h
blob: 0f34f3886e4546afc6ad266d167dbfa0bed957d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: BSD-3-Clause

#ifndef INVERTER_TOOLS_VOLTRONIC_CRC_H
#define INVERTER_TOOLS_VOLTRONIC_CRC_H

#include <cstdint>
#include <cstdlib>
#include "../numeric_types.h"

namespace voltronic {

typedef u16 CRC;

void crc_write(CRC crc, u8* buffer);
CRC crc_read(const u8* buf);
CRC crc_calculate(const u8* buf, size_t bufSize);

}

#endif //INVERTER_TOOLS_VOLTRONIC_CRC_H