diff --git a/Makefile b/Makefile index e723fab..2b4fd6e 100644 --- a/Makefile +++ b/Makefile @@ -11,5 +11,5 @@ clean: %.o: %.c *.h $(CC) -c $(CFLAGS) $< -o $@ -adsbus: adsbus.o receive.o send.o incoming.o outgoing.o airspy_adsb.o beast.o json.o raw.o stats.o common.o - $(CC) $(LDFLAGS) -o adsbus adsbus.o receive.o send.o incoming.o outgoing.o airspy_adsb.o beast.o json.o raw.o stats.o common.o $(LIBS) +adsbus: adsbus.o receive.o send.o incoming.o outgoing.o airspy_adsb.o beast.o json.o raw.o stats.o wakeup.o common.o + $(CC) $(LDFLAGS) -o adsbus adsbus.o receive.o send.o incoming.o outgoing.o airspy_adsb.o beast.o json.o raw.o stats.o wakeup.o common.o $(LIBS) diff --git a/adsbus.c b/adsbus.c index 8ed6dd9..1412b5e 100644 --- a/adsbus.c +++ b/adsbus.c @@ -4,6 +4,7 @@ #include #include "common.h" +#include "wakeup.h" #include "receive.h" #include "send.h" @@ -174,9 +175,13 @@ static bool parse_opts(int argc, char *argv[]) { } int main(int argc, char *argv[]) { - peer_init(); hex_init(); + + peer_init(); + wakeup_init(); + send_init(); + airspy_adsb_init(); beast_init(); json_init(); diff --git a/wakeup.c b/wakeup.c new file mode 100644 index 0000000..35f517d --- /dev/null +++ b/wakeup.c @@ -0,0 +1,14 @@ +#include +#include + +#include "common.h" + +#include "wakeup.h" + +void wakeup_init() { + int pipefd[2]; + assert(!pipe(pipefd)); +} + +void wakeup_add(struct peer *peer, int delay_ms) { +} diff --git a/wakeup.h b/wakeup.h new file mode 100644 index 0000000..036bca7 --- /dev/null +++ b/wakeup.h @@ -0,0 +1,6 @@ +#pragma once + +struct peer; + +void wakeup_init(); +void wakeup_add(struct peer *, int);