Add some documentation.
[bertos.git] / bertos / net / afsk.c
index 4164fccd769272a2c6c1b5d8773eb04416d9726e..c30cb22502457899fad5cb5c17cd80bda783ac94 100644 (file)
@@ -254,7 +254,9 @@ void afsk_adc_isr(Afsk *af, int8_t curr_sample)
                 * Determine bit value by reading the last 3 sampled bits.
                 * If the number of ones is two or greater, the bit value is a 1,
                 * otherwise is a 0.
+                * This algorithm presumes that there are 8 samples per bit.
                 */
+               STATIC_ASSERT(SAMPLEPERBIT == 8);
                uint8_t bits = af->sampled_bits & 0x07;
                if (bits == 0x07 // 111, 3 bits set to 1
                 || bits == 0x06 // 110, 2 bits