[][src]Function lin_bus::frame::checksum

pub fn checksum(pid: PID, data: &[u8]) -> u8

Calculate the LIN V2.1 "enhanced" checksum. It is defined as "The inverted eight bit sum with carry. Eight bit sum with carry is equivalent to sum all values and subtract 255 every time the sum is greater or equal to 256"