1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Implement interrupts/noInterrupts

This commit is contained in:
Ivan Grokhotkov
2014-12-23 12:31:26 +03:00
parent 171394f2f9
commit 573d06c846
2 changed files with 7 additions and 4 deletions

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() )

View File

@ -81,7 +81,6 @@ typedef struct _ETSTIMER_ {
ETS_INTR_DISABLE(ETS_GPIO_INUM)
void ets_isr_attach(int routine, void* something, void *buff);
void *pvPortMalloc(size_t xWantedSize);
void *pvPortRealloc(void* ptr, size_t xWantedSize);
void pvPortFree(void *ptr);
@ -107,7 +106,8 @@ void uart_div_modify(int no, int freq);
void ets_isr_mask(int intr);
void ets_isr_unmask(int intr);
void ets_isr_attach(int intr, void *handler, void *arg);
void ets_intr_lock();
void ets_intr_unlock();
#endif /* _ETS_SYS_H */