Greetings. 1st post.
I’ve got two interrupts running: an external and a timer, both set up using <avr/interrupt.h> register writes since I’m used to that level of control and know I will need it as this gadget evolves.
No problems there.
The timer interrupt is slow (1s) to service a temperature control loop, and the external is a once-around pulse on a slow running motor (~3.5Hz).
I need to turn off the temperature control loop from time to time to act on some motor events.
And I’ll ultimately need to turn of the external motor interrupt when I add a faster timer interrupt (say 125us) to sample some data.
There must be a slick way to turn interrupts on and off individually with minimal avr register writes. Or something.
Any good ideas?