mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-15 00:29:02 +00:00
move safe_irq_disable and irq_restore to isr.h
This commit is contained in:
parent
e0da07ae95
commit
1460eac9cd
@ -71,6 +71,8 @@ enum interrupt_nums {
|
||||
#define enable_irq(irq) (*INTENNUM = INT_NUM_##irq)
|
||||
#define disable_irq(irq) (*INTDISNUM = INT_NUM_##irq)
|
||||
|
||||
#define safe_irq_disable(x) volatile uint32_t saved_irq; saved_irq = *INTENABLE; disable_irq(x)
|
||||
#define irq_restore() *INTENABLE = saved_irq
|
||||
|
||||
extern void tmr0_isr(void) __attribute__((weak));
|
||||
extern void tmr1_isr(void) __attribute__((weak));
|
||||
|
@ -98,9 +98,6 @@ enum posts {
|
||||
};
|
||||
static volatile uint8_t last_post = NO_POST;
|
||||
|
||||
#define safe_irq_disable(x) volatile uint32_t saved_irq; saved_irq = *INTENABLE; disable_irq(x)
|
||||
#define irq_restore() *INTENABLE = saved_irq
|
||||
|
||||
volatile uint8_t fcs_mode = USE_FCS;
|
||||
|
||||
/* call periodically to */
|
||||
|
Loading…
Reference in New Issue
Block a user