]> git.scottworley.com Git - tattlekey/blame_incremental - client/sends.h
client: Rename the event enum values
[tattlekey] / client / sends.h
... / ...
CommitLineData
1#ifndef SENDS_H
2#define SENDS_H
3
4#include "pico/cyw43_arch.h"
5#include "pico/util/pheap.h"
6
7typedef struct {
8 uint32_t timestamp;
9 u16_t seq;
10 u8_t send_count;
11} send_t;
12
13bool next_send_less_than(void *user_data, pheap_node_id_t a, pheap_node_id_t b);
14
15void create_send(send_t *sleeping_sends, pheap_t *sleeps_heap,
16 uint32_t timestamp, u16_t seq);
17
18/* When do we next need to send something (in seconds since boot)?
19 * Returns -1 if there's nothing pending. */
20int32_t next_scheduled_send(send_t *sleeping_sends, pheap_t *sleeps_heap);
21
22#endif