|
Post by mutantcaterpillar on Mar 7, 2017 12:46:48 GMT
Hi, I'm trying to find an equivalent for the cli() and sei() instructions to disable and enable all interrupts - the user manual mentions interrupts but not how to disable and re-enable them. How can I do this on a ShieldBuddy? I need precise timing so need to disable them temporarily.
Thanks!
|
|
|
Post by Admin on Mar 7, 2017 13:00:16 GMT
It is possible to disable all interrupts using:
noInterrupts();
This will also stop the delay() and other timer-related functions. Interrupts can be re-enabled using:
interrupts();
|
|
|
Post by mutantcaterpillar on Mar 7, 2017 13:01:48 GMT
Thanks!
|
|