From 8e793c7cd0a13f2c28a8d9cb162cf99a50df9e86 Mon Sep 17 00:00:00 2001 From: batt Date: Sat, 10 Oct 2009 09:14:39 +0000 Subject: [PATCH] Update afsk_test in order to comply to new Afsk context. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3057 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/hw/hw_afsk.h | 11 ++++------- bertos/net/afsk_test.c | 8 +++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/bertos/hw/hw_afsk.h b/bertos/hw/hw_afsk.h index ef2d1b22..b562c18c 100644 --- a/bertos/hw/hw_afsk.h +++ b/bertos/hw/hw_afsk.h @@ -40,6 +40,8 @@ #ifndef HW_AFSK_H #define HW_AFSK_H +#include "cfg/cfg_arch.h" + #if !(ARCH & ARCH_UNITTEST) #warning TODO:This is an example implementation, you must implement it! #define AFSK_ADC_INIT() do { /* Implement me */ } while (0) @@ -63,8 +65,9 @@ #else /* (ARCH & ARCH_UNITTEST) */ #include + #include + /* For test */ - extern int8_t afsk_adc_val; extern uint32_t data_written; extern FILE *fp_dac; extern bool afsk_tx_test; @@ -75,14 +78,8 @@ #define AFSK_STROBE_ON() /* Implement me */ #define AFSK_STROBE_OFF() /* Implement me */ - void afsk_adc_isr(void); - #define DEFINE_AFSK_ADC_ISR() void afsk_adc_isr(void) #define AFSK_ADC_IRQ_END() do { /* Implement me */ } while (0) - #define AFSK_READ_ADC() (afsk_adc_val) - - void afsk_dac_isr(void); - #define DEFINE_AFSK_DAC_ISR() void afsk_dac_isr(void) #define AFSK_DAC_IRQ_END() do { /* Implement me */ } while (0) #define AFSK_DAC_IRQ_START() do { afsk_tx_test = true; } while (0) #define AFSK_DAC_IRQ_STOP() do { afsk_tx_test = false; } while (0) diff --git a/bertos/net/afsk_test.c b/bertos/net/afsk_test.c index d835d628..e3006c16 100644 --- a/bertos/net/afsk_test.c +++ b/bertos/net/afsk_test.c @@ -171,8 +171,7 @@ int afsk_testRun(void) int c; while ((c = fgetc(fp_adc)) != EOF) { - afsk_adc_val = (int8_t)c; - afsk_adc_isr(); + afsk_adc_isr(&afsk_fd, (int8_t)c); ax25_poll(&ax25); } @@ -186,7 +185,7 @@ 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_dac_isr(&afsk_fd); #define SND_DATASIZE_OFF 8 @@ -204,8 +203,7 @@ int afsk_testRun(void) while ((c = fgetc(fp_adc)) != EOF) { - afsk_adc_val = (int8_t)c; - afsk_adc_isr(); + afsk_adc_isr(&afsk_fd, (int8_t)c); ax25_poll(&ax25); } -- 2.25.1