Merge commit '28dbfe9bf7a799ab1da2563fd5e007d007b54168'
[osmocom-bb.git] / src / target / firmware / include / layer1 / sched_gsmtime.h
1 #ifndef _L1_SCHED_GSMTIME_H
2 #define _L1_SCHED_GSMTIME_H
3
4 #include <stdint.h>
5 #include <osmocore/linuxlist.h>
6
7 struct sched_gsmtime_event {
8         struct llist_head list;
9         const struct tdma_sched_item *si;
10         uint32_t fn;
11         uint16_t p3;    /* parameter for TDMA scheduler */
12 };
13
14 /* initialize the GSMTIME scheduler */
15 void sched_gsmtime_init(void);
16
17 /* Scheduling of a single event at a givnen GSM time */
18 int sched_gsmtime(const struct tdma_sched_item *si, uint32_t fn, uint16_t p3);
19
20 /* execute all GSMTIME one-shot events pending for 'current_fn' */
21 int sched_gsmtime_execute(uint32_t current_fn);
22
23 void sched_gsmtime_reset(void);
24 #endif