Skip to content

Commit

Permalink
ETS_INTR_ENABLED & ETS_INT_PENDING as inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Makuna committed May 25, 2015
1 parent 8393dfc commit 95da465
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/sdk/include/ets_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ typedef void (*int_handler_t)(void*);
#define ETS_INTR_DISABLE(inum) \
ets_isr_mask((1<<inum))

inline uint32_t ETS_INTR_ENABLED(void)
{
uint32_t enabled;
__asm__ __volatile__("esync; rsr %0,intenable":"=a" (enabled));
return enabled;
}

inline uint32_t ETS_INTR_PENDING(void)
{
uint32_t pending;
__asm__ __volatile__("esync; rsr %0,interrupt":"=a" (pending));
Expand Down

0 comments on commit 95da465

Please sign in to comment.