Refactor to use new protocol module and sipo.
[bertos.git] / bertos / net / afsk_test.c
index 9aa5083056187f2a336f1c8d857f7aa4f7b6d4a1..cb7d2cd13feb02838192f61720390a1a7026ae7c 100644 (file)
@@ -32,7 +32,6 @@
  *
  * \brief AFSK demodulator test.
  *
- * \version $Id$
  * \author Francesco Sacchi <batt@develer.com>
  * $test$: cp bertos/cfg/cfg_ax25.h $cfgdir/
  * $test$: echo "#undef AX25_LOG_LEVEL" >> $cfgdir/cfg_ax25.h
@@ -51,6 +50,7 @@
 
 #include <cfg/test.h>
 #include <cfg/debug.h>
+#include <cfg/kfile_debug.h>
 
 #include <cpu/byteorder.h>
 
@@ -63,11 +63,13 @@ uint32_t data_size;
 uint32_t data_written;
 Afsk afsk_fd;
 AX25Ctx ax25;
+KFileDebug dbg;
 
 int msg_cnt;
-static void message_hook(UNUSED_ARG(struct AX25Msg *, msg))
+static void message_hook(struct AX25Msg *msg)
 {
        msg_cnt++;
+       ax25_print(&dbg.fd, msg);
 }
 
 static FILE *afsk_fileOpen(const char *name)
@@ -126,6 +128,7 @@ static FILE *afsk_fileOpen(const char *name)
 int afsk_testSetup(void)
 {
        kdbg_init();
+       kfiledebug_init(&dbg);
        fp_adc = afsk_fileOpen("test/afsk_test.au");
        #if CPU_AVR
                #warning TODO: open the file?