summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include/layer1/tdma_sched.h
diff options
context:
space:
mode:
authorSylvain Munaut2010-09-14 21:10:21 +0200
committerSylvain Munaut2010-09-17 20:52:40 +0200
commite041d5b7d79034cdc503fabe8ef9eceb841a4d93 (patch)
tree0e58372eb46d5741386de1b5dcac13c9fc863647 /src/target/firmware/include/layer1/tdma_sched.h
parentfw/layer1: Add a 'flags' field to sched_items and the infra to use it (diff)
downloadosmocom-e041d5b7d79034cdc503fabe8ef9eceb841a4d93.tar.gz
osmocom-e041d5b7d79034cdc503fabe8ef9eceb841a4d93.tar.xz
osmocom-e041d5b7d79034cdc503fabe8ef9eceb841a4d93.zip
fw/layer1: Add some sched items flags to signal DSP & TPU scenarios
If those flags are set in one of the item of the current frame, we end the tpu & dsp scenario in common code. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/include/layer1/tdma_sched.h')
-rw-r--r--src/target/firmware/include/layer1/tdma_sched.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/firmware/include/layer1/tdma_sched.h b/src/target/firmware/include/layer1/tdma_sched.h
index 0c9f319..3c7e166 100644
--- a/src/target/firmware/include/layer1/tdma_sched.h
+++ b/src/target/firmware/include/layer1/tdma_sched.h
@@ -13,6 +13,9 @@
#define TDMASCHED_NUM_FRAMES 25
#define TDMASCHED_NUM_CB 5
+#define TDMA_IFLG_TPU (1<<0)
+#define TDMA_IFLG_DSP (1<<1)
+
typedef int tdma_sched_cb(uint8_t p1, uint8_t p2, uint16_t p3);
/* A single item in a TDMA scheduler bucket */
@@ -62,6 +65,8 @@ void tdma_sched_dump(void);
extern int tdma_end_set(uint8_t p1, uint8_t p2, uint16_t p3);
#define SCHED_ITEM(x, p, y, z) { .cb = x, .p1 = y, .p2 = z, .prio = p, .flags = 0 }
+#define SCHED_ITEM_DT(x, p, y, z) { .cb = x, .p1 = y, .p2 = z, .prio = p, \
+ .flags = TDMA_IFLG_TPU | TDMA_IFLG_DSP }
#define SCHED_END_FRAME() { .cb = NULL, .p1 = 0, .p2 = 0 }
#define SCHED_END_SET() { .cb = &tdma_end_set, .p1 = 0, .p2 = 0 }