Skip to main content

fletcher16

Function fletcher16 

Source
pub fn fletcher16(buf: &[u8]) -> u16
Expand description

Fletcher-16, mod-255 variant — exactly matches Marlin’s host protocol.

The 16-bit result has the running byte-sum (sum1) in its low byte and the running sum-of-sum1 (sum2) in its high byte, both reduced mod 255.