File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 89
89
where
90
90
Time : Into < Self :: Time > ,
91
91
{
92
+ // If the following sequence of events occurs, the COMPARE event will be
93
+ // set here:
94
+ // 1. `start` is called.
95
+ // 2. The timer runs out but `wait` is _not_ called.
96
+ // 3. `start` is called again
97
+ //
98
+ // If that happens, then we need to reset the event here explicitly, as
99
+ // nothing else this method does will reset the event, and if it's still
100
+ // active after this method exits, then the next call to `wait` will
101
+ // return immediately, no matter how much time has actually passed.
102
+ self . 0 . events_compare [ 0 ] . reset ( ) ;
103
+
92
104
// Configure timer to trigger EVENTS_COMPARE when given number of cycles
93
105
// is reached.
94
106
self . 0 . cc [ 0 ] . write ( |w|
You can’t perform that action at this time.
0 commit comments