1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-26 07:02:15 +03:00

true interrupt enable and disable

plus expose cycle count for bit bang timing
This commit is contained in:
Makuna
2015-05-06 08:42:38 -07:00
parent 7defe70d55
commit c328452651
2 changed files with 13 additions and 2 deletions

View File

@ -124,8 +124,11 @@ void timer1_write(uint32_t ticks); //maximum ticks 8388607
void ets_intr_lock();
void ets_intr_unlock();
#define interrupts() ets_intr_unlock();
#define noInterrupts() ets_intr_lock();
void xt_enable_interrupts();
void xt_disable_interrupts();
#define interrupts() xt_enable_interrupts();
#define noInterrupts() xt_disable_interrupts();
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )