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