If set, the raise bit is not cleared in avr_clear_interrupt. This
corresponds to the hardware not clearing the interrupt flag when
executing the interrupt routine.
The only known example of this is the TWI Interrupt Flag TWINT.
2 files changed:
printf("%s cleared %d\n", __FUNCTION__, vector->vector);
vector->pending = 0;
avr_raise_irq(&vector->irq, 0);
- if (vector->raised.reg)
+ if (vector->raised.reg && !vector->raise_sticky)
avr_regbit_clear(avr, vector->raised);
}
avr_irq_t irq; // raised to 1 when queued, to zero when called
uint8_t pending : 1, // 1 while scheduled in the fifo
- trace : 1; // only for debug of a vector
+ trace : 1, // only for debug of a vector
+ raise_sticky : 1; // 1 if the interrupt flag (= the raised regbit) is not cleared
+ // by the hardware when executing the interrupt routine (see TWINT)
} avr_int_vector_t;
// interrupt vectors, and their enable/clear registers