21 #ifndef COSA_HAMMINGCODEC_7_4_HH 22 #define COSA_HAMMINGCODEC_7_4_HH 67 return (pgm_read_byte(&s_symbols[nibble & 0xf]));
79 uint8_t code = pgm_read_byte(&s_codes[symbol >> 1]);
80 return ((symbol & 0x01) ? (code & 0x0f) : (code >> 4));
85 static const uint8_t s_symbols[] PROGMEM;
88 static const uint8_t s_codes[] PROGMEM;
91 static const uint8_t s_preamble[] PROGMEM;
virtual uint8_t decode4(uint8_t symbol)
virtual const uint8_t * preamble()
virtual uint8_t encode4(uint8_t nibble)
Codec(uint8_t bits_per_symbol, uint16_t start_symbol, uint8_t preamble_max=VWI::Transmitter::PREAMBLE_MAX)
const uint8_t SYMBOL_MASK