Fixed splhigh/splx for the IAR compiler
This commit is contained in:
parent
dd8576830e
commit
bf299b1a07
|
@ -275,16 +275,16 @@ splhigh_(void)
|
|||
/*
|
||||
* Restore previous interrupt mask.
|
||||
*/
|
||||
void
|
||||
splx_(int sr)
|
||||
{
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
__bis_SR_register(sr);
|
||||
#else
|
||||
/* If GIE was set, restore it. */
|
||||
asmv("bis %0, r2" : : "r" (sr));
|
||||
#endif
|
||||
}
|
||||
/* void */
|
||||
/* splx_(int sr) */
|
||||
/* { */
|
||||
/* #ifdef __IAR_SYSTEMS_ICC__ */
|
||||
/* __bis_SR_register(sr); */
|
||||
/* #else */
|
||||
/* /\* If GIE was set, restore it. *\/ */
|
||||
/* asmv("bis %0, r2" : : "r" (sr)); */
|
||||
/* #endif */
|
||||
/* } */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* this code will always start the TimerB if not already started */
|
||||
void
|
||||
|
|
|
@ -91,12 +91,12 @@ void msp430_sync_dco(void);
|
|||
void *sbrk(int);
|
||||
|
||||
typedef int spl_t;
|
||||
void splx_(spl_t);
|
||||
/* void splx_(spl_t); */
|
||||
spl_t splhigh_(void);
|
||||
|
||||
#define splhigh() splhigh_()
|
||||
#ifdef __IAR_SYSTEMS_ICC__
|
||||
#define splx(sr) sr = __get_SR_register()
|
||||
#define splx(sr) __bis_SR_register(sr)
|
||||
#else
|
||||
#define splx(sr) __asm__ __volatile__("bis %0, r2" : : "r" (sr))
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue