static __inline__ uint16_t _crc_xmodem_update(uint16_t __crc, uint8_t __data)
Optimized CRC-XMODEM calculation.
Polynomial: x^16 + x^12 + x^5 + 1 (0x1021) Initial value: 0x0
This is the CRC used by the Xmodem-CRC protocol.
The following is the equivalent functionality written in C.