projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove bogus assembler options.
[bertos.git]
/
bertos
/
net
/
afsk_test.c
diff --git
a/bertos/net/afsk_test.c
b/bertos/net/afsk_test.c
index e3006c166eb542070147d253b92902554bacd37c..9aa5083056187f2a336f1c8d857f7aa4f7b6d4a1 100644
(file)
--- a/
bertos/net/afsk_test.c
+++ b/
bertos/net/afsk_test.c
@@
-61,12
+61,9
@@
FILE *fp_adc;
FILE *fp_dac;
uint32_t data_size;
uint32_t data_written;
FILE *fp_dac;
uint32_t data_size;
uint32_t data_written;
-bool afsk_tx_test;
Afsk afsk_fd;
AX25Ctx ax25;
Afsk afsk_fd;
AX25Ctx ax25;
-int8_t afsk_adc_val;
-
int msg_cnt;
static void message_hook(UNUSED_ARG(struct AX25Msg *, msg))
{
int msg_cnt;
static void message_hook(UNUSED_ARG(struct AX25Msg *, msg))
{
@@
-146,8
+143,7
@@
int afsk_testSetup(void)
ASSERT(fwrite(snd_header, 1, sizeof(snd_header), fp_dac) == sizeof(snd_header));
timer_init();
ASSERT(fwrite(snd_header, 1, sizeof(snd_header), fp_dac) == sizeof(snd_header));
timer_init();
- afsk_init(&afsk_fd);
- afsk_fd.fd.error = kfile_genericClose;
+ afsk_init(&afsk_fd, 0 ,0);
ax25_init(&ax25, &afsk_fd.fd, message_hook);
return 0;
}
ax25_init(&ax25, &afsk_fd.fd, message_hook);
return 0;
}
@@
-184,9
+180,13
@@
int afsk_testRun(void)
ax25_send(&ax25, AX25_CALL("abcdef", 0), AX25_CALL("123456", 1), buf, sizeof(buf));
ax25_send(&ax25, AX25_CALL("abcdef", 0), AX25_CALL("123456", 1), buf, sizeof(buf));
- while (afsk_tx_test)
- afsk_dac_isr(&afsk_fd);
-
+ do
+ {
+ int8_t val = afsk_dac_isr(&afsk_fd) - 128;
+ ASSERT(fwrite(&val, 1, sizeof(val), fp_dac) == sizeof(val));
+ data_written++;
+ }
+ while (afsk_fd.sending);
#define SND_DATASIZE_OFF 8
#if CPU_AVR
#define SND_DATASIZE_OFF 8
#if CPU_AVR