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:
@ -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() )
|
||||
|
@ -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 */
|
||||
|
Reference in New Issue
Block a user