X-Git-Url: http://git.scottworley.com/tattlekey/blobdiff_plain/6e43b84fc4f233c4f72e1b82920cacd925411fa9..0527f2292fd8cb1585d63cee916f918cc0a65098:/client/press.h diff --git a/client/press.h b/client/press.h index 69789e0..6cd4c5b 100644 --- a/client/press.h +++ b/client/press.h @@ -3,6 +3,7 @@ #include "pico/cyw43_arch.h" #include "pico/util/pheap.h" +#include "pico/util/queue.h" typedef struct { uint32_t timestamp; @@ -11,8 +12,17 @@ typedef struct { } press_t; typedef struct { - press_t *presses; + /* Queues of various sizes that hold presses. There is one queue for each + * send_count. */ + queue_t *presses; + + /* Tracks when each queue will be next ready-to-send. Empty queues are not in + * the heap. */ pheap_t *sleeps_heap; + + /* The companion-array for the heap. */ + queue_t **sleeps; + } press_pile_t; press_pile_t *create_press_pile();