---
name: "encode_rs8"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/encode_rs8"
---

# encode\_rs8(9)

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

## 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

*rs*

the rs control structure

*data*

data field of a given type

*len*

data length

*par*

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

*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.

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
