]>
Commit | Line | Data |
---|---|---|
2dcbb2a0 SW |
1 | #ifndef SENDS_H |
2 | #define SENDS_H | |
3 | ||
4 | #include "pico/cyw43_arch.h" | |
5 | #include "pico/util/pheap.h" | |
6 | ||
7 | typedef struct { | |
8 | uint32_t timestamp; | |
9 | u16_t seq; | |
10 | u8_t send_count; | |
17461dec | 11 | } press_t; |
2dcbb2a0 | 12 | |
2dcbb2a0 SW |
13 | bool next_send_less_than(void *user_data, pheap_node_id_t a, pheap_node_id_t b); |
14 | ||
17461dec SW |
15 | void create_press(press_t *presses, pheap_t *sleeps_heap, uint32_t timestamp, |
16 | u16_t seq); | |
67001c93 | 17 | |
b512ec26 SW |
18 | /* When do we next need to send something (in seconds since boot)? |
19 | * Returns -1 if there's nothing pending. */ | |
17461dec | 20 | int32_t next_scheduled_send(press_t *presses, pheap_t *sleeps_heap); |
b512ec26 | 21 | |
2dcbb2a0 | 22 | #endif |