Home | History | Annotate | Download | only in nand

Lines Matching defs:bit

37  * Calculates the 22-bit hamming code for a 256-bytes block of data.
65 * index bit to 0 (even) or 1 (odd).
77 * - P4 -> bit 2 of index is 0 --------------------'
78 * - P4' -> bit 2 of index is 1.
79 * - P2 -> bit 1 of index if 0.
81 * We deduce that a bit position has an impact on all
82 * even Px if the log2(x)nth bit of its index is 0
85 * and on all odd Px' if the log2(x)nth bit
202 /* If there is a single bit error, there are 11 bits set to 1 */
204 /* Get byte and bit indexes */
215 uint8_t bit = (correction_code[2] >> 5) & 0x04;
216 bit |= (correction_code[2] >> 4) & 0x02;
217 bit |= (correction_code[2] >> 3) & 0x01;
219 /* Correct bit */
220 data[byte] ^= (1 << bit);
228 /* Otherwise, this is a multi-bit error */