#ifndef SENDS_H #define SENDS_H #include "pico/cyw43_arch.h" #include "pico/util/pheap.h" typedef struct { uint32_t timestamp; u16_t seq; u8_t send_count; } press_t; typedef struct { press_t *presses; pheap_t *sleeps_heap; } press_pile_t; press_pile_t *create_press_pile(); void create_press(press_pile_t *pp, uint32_t timestamp, u16_t seq); /* When do we next need to send something (in seconds since boot)? * Returns -1 if there's nothing pending. */ int32_t next_scheduled_send(press_pile_t *pp); #endif