Simplify DAC ISR interface: now afsk_dac_isr() return the next sample.
[bertos.git] / bertos / net / afsk_test.c
index 7ce7b4c60d6c62c9ba61ff08a4af206779bde3bd..09c1ffdb1d6b9eccb65459e12ed0af73e2375054 100644 (file)
@@ -184,8 +184,11 @@ int afsk_testRun(void)
        ax25_send(&ax25, AX25_CALL("abcdef", 0), AX25_CALL("123456", 1), buf, sizeof(buf));
 
        while (afsk_tx_test)
-               afsk_dac_isr(&afsk_fd);
-
+       {
+               int8_t val = afsk_dac_isr(&afsk_fd) - 128;
+               ASSERT(fwrite(&val, 1, sizeof(val), fp_dac) == sizeof(val));
+               data_written++;
+       }
 
        #define SND_DATASIZE_OFF 8
        #if CPU_AVR