]>
Commit | Line | Data |
---|---|---|
d684c216 L |
1 | #ifndef CRC_H |
2 | #define CRC_H | |
3 | ||
61b0cfe9 | 4 | #ifdef __AVR__ |
d684c216 | 5 | #include <util/crc16.h> |
d684c216 L |
6 | static inline |
7 | uint16_t crc16(uint16_t crc, uint8_t data) | |
8 | { | |
9 | return _crc_ccitt_update(crc, data); | |
10 | } | |
61b0cfe9 L |
11 | #else /* !__AVR__ */ |
12 | #endif /* __AVR__ */ | |
d684c216 L |
13 | |
14 | #endif /* CRC_H */ |