/* * copyright (c) 2008 - 2011 Espressif System * * Define user specified Event signals and Task priorities here * */ #ifndef _ETS_SYS_H #define _ETS_SYS_H #include "c_types.h" #include "eagle_soc.h" #include typedef uint32_t ETSSignal; typedef uint32_t ETSParam; typedef struct ETSEventTag ETSEvent; struct ETSEventTag { ETSSignal sig; ETSParam par; }; typedef void (*ETSTask)(ETSEvent *e); /* timer related */ typedef uint32_t ETSHandle; typedef void ETSTimerFunc(void *timer_arg); typedef struct _ETSTIMER_ { struct _ETSTIMER_ *timer_next; uint32_t timer_expire; uint32_t timer_period; ETSTimerFunc *timer_func; void *timer_arg; } ETSTimer; /* interrupt related */ typedef void (*int_handler_t)(void*); #define ETS_SLC_INUM 1 #define ETS_SDIO_INUM 1 #define ETS_SPI_INUM 2 #define ETS_GPIO_INUM 4 #define ETS_UART_INUM 5 #define ETS_UART1_INUM 5 #define ETS_CCOMPARE0_INUM 6 #define ETS_SOFT_INUM 7 #define ETS_WDT_INUM 8 #define ETS_FRC_TIMER1_INUM 9 /* use edge*/ #define ETS_INTR_LOCK() \ ets_intr_lock() #define ETS_INTR_UNLOCK() \ ets_intr_unlock() #define ETS_INTR_ENABLE(inum) \ ets_isr_unmask((1<