#include "pico/cyw43_arch.h"
#include "pico/util/pheap.h"
+#include "pico/util/queue.h"
typedef struct {
uint32_t timestamp;
} 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();