1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Implement interrupts/noInterrupts

This commit is contained in:
Ivan Grokhotkov 2014-12-23 12:31:26 +03:00
parent d68d0ed585
commit f51f18fb0a

View File

@ -76,8 +76,11 @@ void yield(void);
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))
#define interrupts() sei()
#define noInterrupts() cli()
void ets_intr_lock();
void ets_intr_unlock();
#define interrupts() ets_intr_unlock();
#define noInterrupts() ets_intr_lock();
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )