Lines Matching refs:code
11 * - Redistributions of source code must retain the above copyright notice,
37 * Calculates the 22-bit hamming code for a 256-bytes block of data.
38 * \param data Data buffer to calculate code for.
39 * \param code Pointer to a buffer where the code should be stored.
42 hamming_compute_256(const uint8_t *data, uint8_t *code)
60 * incidence on the computed code; so check if the sum is 1.
118 * Code[0] = Line1
119 * Code[1] = Line2
120 * Code[2] = Column
124 code[0] = 0;
125 code[1] = 0;
126 code[2] = 0;
129 code[0] <<= 2;
130 code[1] <<= 2;
131 code[2] <<= 2;
136 code[0] |= 2;
140 code[0] |= 1;
146 code[1] |= 2;
150 code[1] |= 1;
156 code[2] |= 2;
160 code[2] |= 1;
170 code[0] = ~code[0];
171 code[1] = ~code[1];
172 code[2] = ~code[2];
177 * hamming code.
178 * Returns 0 if there is no error, otherwise returns a HAMMING_ERROR code.
180 * \param original_code Hamming code to use for verifying the data.
186 /* Calculate new code */