Skip to content

Commit 9aaf888

Browse files
committed
cc3200: Add __get_BASEPRI and __set_BASEPRI inline function definitions.
1 parent dd7d2e0 commit 9aaf888

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cc3200/hal/cc3200_asm.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ static inline void __set_PRIMASK(uint32_t priMask) {
6767
__asm volatile ("msr primask, %0" : : "r" (priMask) : "memory");
6868
}
6969

70+
__attribute__(( always_inline ))
71+
static inline uint32_t __get_BASEPRI(void) {
72+
uint32_t result;
73+
__asm volatile ("mrs %0, basepri" : "=r" (result));
74+
return(result);
75+
}
76+
77+
__attribute__(( always_inline ))
78+
static inline void __set_BASEPRI(uint32_t value) {
79+
__asm volatile ("msr basepri, %0" : : "r" (value) : "memory");
80+
}
81+
7082
__attribute__(( always_inline ))
7183
static inline void enable_irq(mp_uint_t state) {
7284
__set_PRIMASK(state);

0 commit comments

Comments
 (0)