Merge pull request #7217 from dhalbert/samd21-tick-event
samd21: port_disable_tick() should disable event channel
This commit is contained in:
commit
a4bd7721e9
@ -644,6 +644,10 @@ void port_disable_tick(void) {
|
|||||||
RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_PER2;
|
RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_PER2;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SAMD21
|
#ifdef SAMD21
|
||||||
|
if (_tick_event_channel == EVSYS_SYNCH_NUM) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_tick_event_channel >= 8) {
|
if (_tick_event_channel >= 8) {
|
||||||
uint8_t value = 1 << (_tick_event_channel - 8);
|
uint8_t value = 1 << (_tick_event_channel - 8);
|
||||||
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVDp8(value);
|
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVDp8(value);
|
||||||
@ -651,6 +655,7 @@ void port_disable_tick(void) {
|
|||||||
uint8_t value = 1 << _tick_event_channel;
|
uint8_t value = 1 << _tick_event_channel;
|
||||||
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVD(value);
|
EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVD(value);
|
||||||
}
|
}
|
||||||
|
disable_event_channel(_tick_event_channel);
|
||||||
_tick_event_channel = EVSYS_SYNCH_NUM;
|
_tick_event_channel = EVSYS_SYNCH_NUM;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user