42#ifndef __ATTR_ALWAYS_INLINE__
43#define __ATTR_ALWAYS_INLINE__ __inline__ __attribute__((__always_inline__))
115static __ATTR_ALWAYS_INLINE__
uint16_t
121 __asm__ __volatile__ (
126 "mov __tmp_reg__,%1" "\n\t"
129 "eor %1,__tmp_reg__" "\n\t"
130 "mov __tmp_reg__,%1" "\n\t"
132 "eor %1,__tmp_reg__" "\n\t"
133 "andi %1,0x07" "\n\t"
134 "mov __tmp_reg__,%A0" "\n\t"
137 "ror __tmp_reg__" "\n\t"
139 "mov %B0,__tmp_reg__" "\n\t"
141 "lsr __tmp_reg__" "\n\t"
143 "eor %B0,__tmp_reg__" "\n\t"
145 :
"=r" (__ret),
"=d" (__tmp)
146 :
"r" (__data),
"0" (__crc)
179static __ATTR_ALWAYS_INLINE__
uint16_t
187 __asm__ __volatile__ (
196 "andi %A0,0xf0" "\n\t"
197 "andi %B0,0x0f" "\n\t"
207 :
"=d" (__ret),
"=r" (__tmp1),
"=r" (__tmp2)
208 :
"r" (__data),
"0" (__crc)
242static __ATTR_ALWAYS_INLINE__
uint16_t
247 __asm__ __volatile__ (
250 "mov __tmp_reg__,%A0" "\n\t"
252 "andi %A0,0xf0" "\n\t"
253 "eor %A0,__tmp_reg__" "\n\t"
255 "mov __tmp_reg__,%B0" "\n\t"
260 "andi %A0,0x0f" "\n\t"
261 "eor __tmp_reg__,%A0" "\n\t"
270 "eor %A0,__tmp_reg__"
273 :
"r" (__data),
"0" (__crc)
307static __ATTR_ALWAYS_INLINE__
uint8_t
311 __asm__ __volatile__ (
320 :
"=r" (__crc),
"=d" (__i),
"=d" (__pattern)
321 :
"0" (__crc),
"r" (__data));
370static __ATTR_ALWAYS_INLINE__
uint8_t
374 __asm__ __volatile__ (
383 :
"=r" (__crc),
"=d" (__i),
"=d" (__pattern)
384 :
"0" (__crc),
"r" (__data));
unsigned int uint16_t
Definition: stdint.h:93
unsigned char uint8_t
Definition: stdint.h:83
static uint16_t _crc_xmodem_update(uint16_t __crc, uint8_t __data)
Definition: crc16.h:180
static uint16_t _crc_ccitt_update(uint16_t __crc, uint8_t __data)
Definition: crc16.h:243
static uint8_t _crc8_ccitt_update(uint8_t __crc, uint8_t __data)
Definition: crc16.h:371
static uint8_t _crc_ibutton_update(uint8_t __crc, uint8_t __data)
Definition: crc16.h:308
static uint16_t _crc16_update(uint16_t __crc, uint8_t __data)
Definition: crc16.h:116