[][src]Macro embedded_crc_macros::crc8

macro_rules! crc8 {
    ($function_name:ident, $poly:expr, $initial_value:expr, $doc:expr) => { ... };
}

Define public function implementing the CRC-8 algorithm for the given polynomial and initial value.

A function name and some documentation for it must be provided. For example:

use embedded_crc_macros::crc8;
crc8!(smbus_pec, 7 /* x^8+x^2+x+1 */, 0, "SMBus Packet Error Code");