]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de> | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0+ | |
5 | */ | |
6 | ||
7 | #ifndef CRC_H | |
8 | #define CRC_H | |
9 | ||
10 | #ifdef __AVR__ | |
11 | #include <util/crc16.h> | |
12 | static inline | |
13 | uint16_t crc16(uint16_t crc, uint8_t data) | |
14 | { | |
15 | return _crc_ccitt_update(crc, data); | |
16 | } | |
17 | #else /* !__AVR__ */ | |
18 | /* TODO */ | |
19 | #endif /* __AVR__ */ | |
20 | ||
21 | #endif /* CRC_H */ |