NoInterrupts()

From Microduino Wiki
Revision as of 04:08, 12 August 2016 by Fengfeng (talk) (Created page with "noInterrupts() *'''Description''' Forbid the interrupt (re enable interrupts()). Interrupt allows some important tasks run in the background, and it is able to interrupt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

noInterrupts()

  • Description

Forbid the interrupt (re enable interrupts()). Interrupt allows some important tasks run in the background, and it is able to interrupt by default. When forbidding the interrupt, some functions won’t be able to work, and information received during the communication maybe lost.

Interrupt can slightly affect the timing code, and it will also lose effect in specified code.

  • Parameter

No

  • Return

No

  • Example

void setup()
 
void loop()
{
noInterrupts();
//put key and time-sensitive code here 
  interrupts();
//write other code here 
}

[Return to Arduino Syntax Manual]