File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 5959 pub fn enable_event ( & mut self ) {
6060 self . chan . with_disable ( |e| {
6161 e. evctrl ( )
62- . modify ( |_, w| unsafe { w. bits ( 1 << P :: ChId :: ID ) } ) ;
62+ . modify ( |r, w| unsafe { w. bits ( r. bits ( ) | 1 << P :: ChId :: ID ) } ) ;
63+ } ) ;
64+ }
65+
66+ /// Disables the event output of the channel for the event system.
67+ ///
68+ /// Note that whilst this function is executed, the EIC peripheral is disabled
69+ /// in order to write to the evctrl register
70+ pub fn disable_event ( & mut self ) {
71+ self . chan . with_disable ( |e| {
72+ e. evctrl ( )
73+ . modify ( |r, w| unsafe { w. bits ( r. bits ( ) & !( 1 << P :: ChId :: ID ) ) } ) ;
6374 } ) ;
6475 }
6576
Original file line number Diff line number Diff line change 6565 pub fn enable_event ( & mut self ) {
6666 self . chan . with_disable ( |e| {
6767 e. evctrl ( )
68- . modify ( |_, w| unsafe { w. bits ( 1 << P :: ChId :: ID ) } ) ;
68+ . modify ( |r, w| unsafe { w. bits ( r. bits ( ) | 1 << P :: ChId :: ID ) } ) ;
69+ } ) ;
70+ }
71+
72+ /// Disables the event output of the channel for the event system.
73+ ///
74+ /// Note that whilst this function is executed, the EIC peripheral is disabled
75+ /// in order to write to the evctrl register
76+ pub fn disable_event ( & mut self ) {
77+ self . chan . with_disable ( |e| {
78+ e. evctrl ( )
79+ . modify ( |r, w| unsafe { w. bits ( r. bits ( ) & !( 1 << P :: ChId :: ID ) ) } ) ;
6980 } ) ;
7081 }
7182
You can’t perform that action at this time.
0 commit comments