-
Notifications
You must be signed in to change notification settings - Fork 7
noInterrupts
gicking edited this page Feb 6, 2018
·
2 revisions
back to Command Reference / Interrupt
Disables interrupts (you can re-enable them with interrupts(). Interrupts allow certain important tasks to happen in the background and are enabled by default. Some functions will not work while interrupts are disabled, and incoming communication may be ignored. Interrupts can slightly disrupt the timing of code, however, and may be disabled for particularly critical sections of code.
- defined in
misc.h
- auto-loaded in
main_general.h
- no
#define
required
noInterrupts()
-
input:
- none
-
output:
- none
- Nothing
The below code disables all interrupts, performs some time-critical code, and re-enable interrupts afterwards.
#include "main_general.h" // board-independent main
void setup() {}
void loop()
{
noInterrupts();
// critical, time-sensitive code here
interrupts();
// other code here
}
- tbd
- interrupts()
- startClock()
- stopClock()
- attachInterruptMillis()
- detachInterruptMillis()
- interrupt routines of modules, e.g. UART or timers
-
Getting Started
-
- General Commands
- Libraries
- LCD BTHQ21605V
- poti AD5280
- poti AD5282
- freemodbus
- PetitFS SD-card (min)
- FatFS: SD card (full)
- Board Specific
-
- Universal
- Board Specific