Telegraph is a collection of C-based routines I've found useful in dealing with non-Linux-based microcontrollers like PIC and AVR.. It includes a Hamming(8,4) encoder and decoder, a Fletctcher 16-bit checksum generator, a simple signal debouncer and edge detector useful for dealing with general purpose input/output (GPIO) pins, and some stuff ported from Diminuto that wasn't (as most of Diminuto is) specific to Linux-based development.
Hamming codes are a class of error correcting codes or ECCs invented by Richard Hamming in 1947 when he was at Bell Labs. He published his paper describing them in the Bell System Technical Journal in 1950 [R. W. Hamming, "Error Detecting and Error Correcting Codes", BSTJ, XXIX.2, April 1950]. Hamming codes are widely used today in telecommunications and in semiconductor memory systems.
Hamming(8,4) encodes a four-bit data nibble into an eight-bit symbol byte with four parity bits in such a way that single-bit errors in a symbol can be detected and corrected, and double-bit errors can be detected. In this way, moderately noisy communication channels or storage mediums can be used at the expense of some overhead. Hamming(8,4) is an example of a SECDED code ("single error correction, double error detection") which uses a Hamming(7,4) code (that's the SEC part) with an additional fourth parity bit (the DED part).
Fletcher-16 is a dirt simple sixteen bit checksum algorithm used in TCP headers [J. Zweig, C. Partridge, "TCP Alternate Checksum Options", RFC 1146, March 1990] and in other embedded applications.
The distribution contains a unit test suite.
Telegraph can be found on GitHub here.