Reduce task's context size

Since RTC ans STK timestamps are now different, they don't need to be as big and
be can safely reduce their size to 24 bits to save space
This commit is contained in:
Steins7 2024-11-03 22:53:19 +01:00
parent 8540e2e21f
commit b893a0283f
2 changed files with 4 additions and 3 deletions

View File

@ -165,3 +165,4 @@ static void callback_rtc(void)
bkp_set_rtc_alam(1);
pwr_configure_bkp_write(false);
}

View File

@ -47,10 +47,10 @@ enum TaskTrigger {
* struct
*/
struct TaskState {
uint32_t timestamp; //timestamp at wich to wakeup the task, if any
uint8_t count:5; //task counter: active step of task
uint32_t timestamp:24; //timestamp at wich to wakeup the task, if any
uint32_t count:5; //task counter: active step of task
enum TaskTrigger trigger:2; //triggers on wich to execute the task
uint8_t timeout_mode:1; //whether the timestamp is a timeout or a delay
uint32_t timeout_mode:1; //whether the timestamp is a timeout or a delay
};
/**