Index
 
  Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name  

interrupts()

   
Examples  
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 I/O board. By default interruptions on the Wiring I/O 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 I/O board will not work again in the current program.

noInterrupts()interrupts() 메소드는 Wiring I/O보드에서 인터럽트 사용금지 와 사용허용 합니다. 모든 Wiring 기능성은 인터럽트를 금지하여 정지됩니다. 이 메소드는 타이밍이 중요하여 다른 방해가 되지 않아야 되는 시리얼 통신 또는 시간과 관련된 라이브러리를 멈추지 않는 용도에 유용하게 사용합니다.이 메소드는 고급사용자에게 그들이 무었을 할지 정확히 알도록 합니다.인터럽트를 금지한 후에는 다른 I/O 동작을 위하여 인터럽트 가능 상태로 만들어야 합니다. 그렇지 않으면 Wiring I/O 보드에서 다른 I/O 동작이 실행되지 않습니다. 현재 실행프로그램이 다시 동작하지 않게 됩니다.

   
Syntax  
interrupts()
   
Returns   None
   
Usage   Application
   
Related   noInterrupts()