X-Git-Url: http://git.scottworley.com/tattlekey/blobdiff_plain/4db97133ae0498147735ef312fbd5cdea969e6da..2dcbb2a0df003ac8a644c9111c3b7b7f2db42aaa:/client/tattlekey.c diff --git a/client/tattlekey.c b/client/tattlekey.c index 9af9b5a..48db1b7 100644 --- a/client/tattlekey.c +++ b/client/tattlekey.c @@ -7,20 +7,7 @@ #include "button.h" #include "config.h" #include "net.h" - -typedef struct { - uint32_t timestamp; - u16_t seq; - u8_t send_count; -} send_t; - -uint32_t next_send(send_t *s) { return s->timestamp + s->send_count; } - -bool next_send_less_than(void *user_data, pheap_node_id_t a, - pheap_node_id_t b) { - send_t *sends = (send_t *)user_data; - return next_send(&sends[a]) < next_send(&sends[b]); -} +#include "sends.h" enum event_type { BUTTONPRESS, SEND }; typedef struct {