mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Define a _NOP() macro
Recent avr-libc releases define one, but this allows using it also on older avr-libc releases.
This commit is contained in:
parent
6cce4787bf
commit
6ac8185c08
@ -88,6 +88,10 @@ void yield(void);
|
||||
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
|
||||
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
|
||||
|
||||
// avr-libc defines _NOP() since 1.6.2
|
||||
#ifndef _NOP
|
||||
#define _NOP() do { __asm__ volatile ("nop"); } while (0)
|
||||
#endif
|
||||
|
||||
typedef unsigned int word;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user