File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,11 @@ impl InterruptContext {
17
17
}
18
18
}
19
19
20
- pub fn get_task_field_mut ( & self ) -> FreeRtosBaseTypeMutPtr {
21
- self . x_higher_priority_task_woken as * mut _
20
+ pub fn get_task_field_mut ( & mut self ) -> FreeRtosBaseTypeMutPtr {
21
+ & mut self . x_higher_priority_task_woken as * mut _
22
+ }
23
+ pub fn higher_priority_task_woken ( & self ) -> FreeRtosBaseType {
24
+ self . x_higher_priority_task_woken
22
25
}
23
26
}
24
27
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ impl Task {
241
241
/// Notify this task from an interrupt.
242
242
pub fn notify_from_isr (
243
243
& self ,
244
- context : & InterruptContext ,
244
+ context : & mut InterruptContext ,
245
245
notification : TaskNotification ,
246
246
) -> Result < ( ) , FreeRtosError > {
247
247
unsafe {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ impl Timer {
157
157
}
158
158
159
159
/// Start the timer from an interrupt.
160
- pub fn start_from_isr ( & self , context : & InterruptContext ) -> Result < ( ) , FreeRtosError > {
160
+ pub fn start_from_isr ( & self , context : & mut InterruptContext ) -> Result < ( ) , FreeRtosError > {
161
161
unsafe {
162
162
if freertos_rs_timer_start_from_isr ( self . handle , context. get_task_field_mut ( ) ) == 0 {
163
163
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments