Framework (A-Z)

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.



void setup() {

void loop() { 
  noInterrupts(); // disable all possible interruptions
  // critical code section

  interrupts();   // enable interruptions

  // other code 
Description The noInterrupts() and interrupts() methods disable and enable interrupts, respectively, in the Wiring hardware. By default interruptions on the Wiring board are enabled to allow the environment, libraries and time to work. Note that all the Wiring functionality will stop by disabling interrupts. These methods are useful to mark critical sections of code where timing is so important that it can not be interrupted by other tasks (like Serial, Wire, other libraries or timing activities). The methods are provided for advanced users who know exactly what they are doing. After disabling interrupts it is necessary to re-enable them or all other I/O activities in the Wiring board will not work again in the current program.
Returns None
Usage Application
Related noInterrupts()
Updated on July 07, 2011 11:08:24pm PDT

Creative Commons License