Name

encode_rs8 — Calculate the parity for data values (8bit data width)

Synopsis

int encode_rs8 (struct rs_control * rs,
 uint8_t * data,
 int len,
 uint16_t * par,
 uint16_t invmsk);
 

Arguments

struct rs_control * rs

the rs control structure

uint8_t * data

data field of a given type

int len

data length

uint16_t * par

parity data, must be initialized by caller (usually all 0)

uint16_t invmsk

invert data mask (will be xored on data)

Description

The parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of encoding of the syndrome result for storage itself.