2020-11-28 20:23:35 -07:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "morse.h"
|
|
|
|
|
|
|
|
// gcc -D test_main=main -o test morse.cpp test.cpp && ./test
|
|
|
|
|
|
|
|
int test_main(int argc, char *argv[]) {
|
2020-12-15 19:32:50 -07:00
|
|
|
MorseEncoder enc = MorseEncoder("SOS ck ck \x03");
|
2020-11-28 20:23:35 -07:00
|
|
|
while (enc.Tick()) {
|
|
|
|
if (enc.Transmitting) {
|
|
|
|
printf("#");
|
|
|
|
} else {
|
|
|
|
printf(" ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|