Start of wakeup framework.

This commit is contained in:
Ian Gulliver
2016-02-18 09:33:32 -08:00
parent 820d5d6192
commit 6ac29e9704
4 changed files with 28 additions and 3 deletions

View File

@@ -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)

View File

@@ -4,6 +4,7 @@
#include <string.h>
#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();

14
wakeup.c Normal file
View File

@@ -0,0 +1,14 @@
#include <assert.h>
#include <unistd.h>
#include "common.h"
#include "wakeup.h"
void wakeup_init() {
int pipefd[2];
assert(!pipe(pipefd));
}
void wakeup_add(struct peer *peer, int delay_ms) {
}

6
wakeup.h Normal file
View File

@@ -0,0 +1,6 @@
#pragma once
struct peer;
void wakeup_init();
void wakeup_add(struct peer *, int);