File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 82
82
}
83
83
84
84
/// Enable the generation of a hardware interrupt from a given stimulus
85
+ ///
86
+ /// If access to the NVIC is not provided, the interrupt must ALSO be enabled
87
+ /// there outside of this function (e.g. manually call `nvic.enable`, or through
88
+ /// the use of RTFM).
85
89
pub fn enable_interrupt ( & mut self , int : RtcInterrupt , nvic : Option < & mut NVIC > ) {
86
90
match int {
87
91
RtcInterrupt :: Tick => self . periph . intenset . write ( |w| w. tick ( ) . set ( ) ) ,
@@ -97,6 +101,10 @@ where
97
101
}
98
102
99
103
/// Disable the generation of a hardware interrupt from a given stimulus
104
+ ///
105
+ /// If access to the NVIC is not provided, the interrupt must ALSO be disabled
106
+ /// there outside of this function (e.g. manually call `nvic.enable`, or through
107
+ /// the use of RTFM).
100
108
pub fn disable_interrupt ( & mut self , int : RtcInterrupt , nvic : Option < & mut NVIC > ) {
101
109
match int {
102
110
RtcInterrupt :: Tick => self . periph . intenclr . write ( |w| w. tick ( ) . clear ( ) ) ,
Original file line number Diff line number Diff line change 60
60
///
61
61
/// Enables an interrupt that is fired when the timer reaches the value that
62
62
/// is given as an argument to `start`.
63
+ ///
64
+ /// If access to the NVIC is not provided, the interrupt must ALSO be enabled
65
+ /// there outside of this function (e.g. manually call `nvic.enable`, or through
66
+ /// the use of RTFM).
63
67
pub fn enable_interrupt ( & mut self , nvic : Option < & mut NVIC > ) {
64
68
// As of this writing, the timer code only uses
65
69
// `cc[0]`/`events_compare[0]`. If the code is extended to use other
75
79
///
76
80
/// Disables an interrupt that is fired when the timer reaches the value
77
81
/// that is given as an argument to `start`.
82
+ ///
83
+ /// If access to the NVIC is not provided, the interrupt must ALSO be disabled
84
+ /// there outside of this function (e.g. manually call `nvic.enable`, or through
85
+ /// the use of RTFM).
78
86
pub fn disable_interrupt ( & mut self , nvic : Option < & mut NVIC > ) {
79
87
// As of this writing, the timer code only uses
80
88
// `cc[0]`/`events_compare[0]`. If the code is extended to use other
You can’t perform that action at this time.
0 commit comments