cc3200: Add __get_BASEPRI and __set_BASEPRI inline function definitions.

This commit is contained in:
Damien George 2015-12-04 12:13:57 +00:00
parent dd7d2e0810
commit 9aaf888b42

View File

@ -67,6 +67,18 @@ static inline void __set_PRIMASK(uint32_t priMask) {
__asm volatile ("msr primask, %0" : : "r" (priMask) : "memory");
}
__attribute__(( always_inline ))
static inline uint32_t __get_BASEPRI(void) {
uint32_t result;
__asm volatile ("mrs %0, basepri" : "=r" (result));
return(result);
}
__attribute__(( always_inline ))
static inline void __set_BASEPRI(uint32_t value) {
__asm volatile ("msr basepri, %0" : : "r" (value) : "memory");
}
__attribute__(( always_inline ))
static inline void enable_irq(mp_uint_t state) {
__set_PRIMASK(state);