atmel-samd: Turn off PulseIn interrupts on reset. Can hardfault otherwise.

This commit is contained in:
Scott Shawcroft 2017-04-13 17:50:06 -07:00
parent f0e24bd812
commit f37ce1c595
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ static uint16_t last_us[EIC_NUMBER_OF_INTERRUPTS];
void pulsein_reset(void) { void pulsein_reset(void) {
for (int i = 0; i < EIC_NUMBER_OF_INTERRUPTS; i++) { for (int i = 0; i < EIC_NUMBER_OF_INTERRUPTS; i++) {
if (active_pulseins[i] != NULL) {
extint_chan_disable_callback(i, EXTINT_CALLBACK_TYPE_DETECT);
}
active_pulseins[i] = NULL; active_pulseins[i] = NULL;
last_ms[i] = 0; last_ms[i] = 0;
last_us[i] = 0; last_us[i] = 0;