summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/include
diff options
context:
space:
mode:
authorSylvain Munaut2010-09-14 20:48:58 +0200
committerSylvain Munaut2010-09-17 20:52:40 +0200
commitf06d54ed6fec78ec9c6dd106e5634b3a8c6a5220 (patch)
tree3ae047a5c2e23e9354e41372295ad067833f2655 /src/target/firmware/include
parent[layer23] Added XOR and COMP128 encryption to test SIM (diff)
downloadosmocom-f06d54ed6fec78ec9c6dd106e5634b3a8c6a5220.tar.gz
osmocom-f06d54ed6fec78ec9c6dd106e5634b3a8c6a5220.tar.xz
osmocom-f06d54ed6fec78ec9c6dd106e5634b3a8c6a5220.zip
fw/layer1: Add a priority field for sched_item
Each item has a priority associated to it. The standard is : -4 -> Responses processing -3 -> L1S parameters changes -2 -> [Reserved for TPU window setup] -1 -> (anything) 0..7 -> Commands relative to time slot n (relative to current l1s main timeslot) 8 -> (anything) 9 -> [Reserved for TPU window cleanup] 10 -> (anthing) Note that with this modification, an item scheduled for the current frame from within a call back won't have its priority respected ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/include')
-rw-r--r--src/target/firmware/include/layer1/tdma_sched.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/target/firmware/include/layer1/tdma_sched.h b/src/target/firmware/include/layer1/tdma_sched.h
index 9486c4a..2c5873c 100644
--- a/src/target/firmware/include/layer1/tdma_sched.h
+++ b/src/target/firmware/include/layer1/tdma_sched.h
@@ -21,6 +21,7 @@ struct tdma_sched_item {
uint8_t p1;
uint8_t p2;
uint16_t p3;
+ int16_t prio;
};
/* A bucket inside the TDMA scheduler */
@@ -36,7 +37,8 @@ struct tdma_scheduler {
};
/* Schedule an item at 'frame_offset' TDMA frames in the future */
-int tdma_schedule(uint8_t frame_offset, tdma_sched_cb *cb, uint8_t p1, uint8_t p2, uint16_t p3);
+int tdma_schedule(uint8_t frame_offset, tdma_sched_cb *cb,
+ uint8_t p1, uint8_t p2, uint16_t p3, int16_t prio);
/* Schedule a set of items starting from 'frame_offset' TDMA frames in the future */
int tdma_schedule_set(uint8_t frame_offset, const struct tdma_sched_item *item_set, uint16_t p3);
@@ -55,7 +57,7 @@ void tdma_sched_dump(void);
extern int tdma_end_set(uint8_t p1, uint8_t p2, uint16_t p3);
-#define SCHED_ITEM(x, y, z) { .cb = x, .p1 = y, .p2 = z }
+#define SCHED_ITEM(x, p, y, z) { .cb = x, .p1 = y, .p2 = z, .prio = p }
#define SCHED_END_FRAME() { .cb = NULL, .p1 = 0, .p2 = 0 }
#define SCHED_END_SET() { .cb = &tdma_end_set, .p1 = 0, .p2 = 0 }