You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
298 B
20 lines
298 B
#pragma once |
|
|
|
/* |
|
* IAR specific functions for IRQ disable/enable |
|
*/ |
|
|
|
typedef __istate_t atomic_t; |
|
|
|
static inline atomic_t atomic_begin(void) |
|
{ |
|
__istate_t a = __get_interrupt_state(); |
|
__disable_interrupt(); |
|
return a; |
|
} |
|
|
|
static inline void atomic_end(atomic_t a) |
|
{ |
|
__set_interrupt_state(a); |
|
} |
|
|
|
|