File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ pub trait Ppi: PpiSealed {
82
82
/// Sets the fork task that must be triggered when the configured event occurs. The user must
83
83
/// provide a reference to the task.
84
84
fn set_fork_task_endpoint < T : Task > ( & mut self , task : & T ) ;
85
+
86
+ #[ cfg( not( feature = "51" ) ) ]
87
+ /// Clear the fork task endpoint. Previously set task will no longer be triggered.
88
+ fn clear_fork_task_endpoint ( & mut self ) ;
85
89
}
86
90
87
91
/// Traits that extends the [Ppi](trait.Ppi.html) trait, marking a channel as fully configurable.
@@ -133,6 +137,15 @@ impl<P: Channel> Ppi for P {
133
137
. tep
134
138
. write ( |w| unsafe { w. bits ( task. task_addr ( ) . 0 ) } ) ;
135
139
}
140
+
141
+ #[ cfg( not( feature = "51" ) ) ]
142
+ #[ inline( always) ]
143
+ fn clear_fork_task_endpoint ( & mut self ) {
144
+ let regs = unsafe { & * PPI :: ptr ( ) } ;
145
+ regs. fork [ P :: CH ]
146
+ . tep
147
+ . write ( |w| unsafe { w. bits ( 0 ) } ) ;
148
+ }
136
149
}
137
150
138
151
// All unsafe `ptr` calls only uses registers atomically, and only changes the resources owned by
You can’t perform that action at this time.
0 commit comments