1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #1665 from N8Fear/uninitvar

lint: fix warnings because of uninitialized variables
This commit is contained in:
René Kijewski 2014-09-17 01:40:45 +02:00
commit c61721cac0
5 changed files with 153 additions and 153 deletions

View File

@ -453,7 +453,7 @@ int print_and_prompt(struct ftdi_device_list *devlist)
curdev->dev, curdev->dev,
manufacturer, 128, manufacturer, 128,
description, 128, description, 128,
serial, 128) serial, 128);
if (0 > ret) { if (0 > ret) {
fprintf(stderr, "ftdi_usb_get_strings failed: %d (%s)\n", fprintf(stderr, "ftdi_usb_get_strings failed: %d (%s)\n",
ret, ftdi_get_error_string(&ftdic)); ret, ftdi_get_error_string(&ftdic));

View File

@ -48,7 +48,7 @@
*/ */
static __INLINE uint32_t __get_CONTROL(void) static __INLINE uint32_t __get_CONTROL(void)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
return(__regControl); return(__regControl);
} }
@ -61,7 +61,7 @@ static __INLINE uint32_t __get_CONTROL(void)
*/ */
static __INLINE void __set_CONTROL(uint32_t control) static __INLINE void __set_CONTROL(uint32_t control)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
__regControl = control; __regControl = control;
} }
@ -74,7 +74,7 @@ static __INLINE void __set_CONTROL(uint32_t control)
*/ */
static __INLINE uint32_t __get_IPSR(void) static __INLINE uint32_t __get_IPSR(void)
{ {
register uint32_t __regIPSR __ASM("ipsr"); register uint32_t __regIPSR asm("ipsr");
return(__regIPSR); return(__regIPSR);
} }
@ -87,7 +87,7 @@ static __INLINE uint32_t __get_IPSR(void)
*/ */
static __INLINE uint32_t __get_APSR(void) static __INLINE uint32_t __get_APSR(void)
{ {
register uint32_t __regAPSR __ASM("apsr"); register uint32_t __regAPSR asm("apsr");
return(__regAPSR); return(__regAPSR);
} }
@ -100,7 +100,7 @@ static __INLINE uint32_t __get_APSR(void)
*/ */
static __INLINE uint32_t __get_xPSR(void) static __INLINE uint32_t __get_xPSR(void)
{ {
register uint32_t __regXPSR __ASM("xpsr"); register uint32_t __regXPSR asm("xpsr");
return(__regXPSR); return(__regXPSR);
} }
@ -113,7 +113,7 @@ static __INLINE uint32_t __get_xPSR(void)
*/ */
static __INLINE uint32_t __get_PSP(void) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
return(__regProcessStackPointer); return(__regProcessStackPointer);
} }
@ -126,7 +126,7 @@ static __INLINE uint32_t __get_PSP(void)
*/ */
static __INLINE void __set_PSP(uint32_t topOfProcStack) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
__regProcessStackPointer = topOfProcStack; __regProcessStackPointer = topOfProcStack;
} }
@ -139,7 +139,7 @@ static __INLINE void __set_PSP(uint32_t topOfProcStack)
*/ */
static __INLINE uint32_t __get_MSP(void) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
return(__regMainStackPointer); return(__regMainStackPointer);
} }
@ -152,7 +152,7 @@ static __INLINE uint32_t __get_MSP(void)
*/ */
static __INLINE void __set_MSP(uint32_t topOfMainStack) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
__regMainStackPointer = topOfMainStack; __regMainStackPointer = topOfMainStack;
} }
@ -165,7 +165,7 @@ static __INLINE void __set_MSP(uint32_t topOfMainStack)
*/ */
static __INLINE uint32_t __get_PRIMASK(void) static __INLINE uint32_t __get_PRIMASK(void)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
return(__regPriMask); return(__regPriMask);
} }
@ -178,7 +178,7 @@ static __INLINE uint32_t __get_PRIMASK(void)
*/ */
static __INLINE void __set_PRIMASK(uint32_t priMask) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
__regPriMask = (priMask); __regPriMask = (priMask);
} }
@ -209,7 +209,7 @@ static __INLINE void __set_PRIMASK(uint32_t priMask)
*/ */
static __INLINE uint32_t __get_BASEPRI(void) static __INLINE uint32_t __get_BASEPRI(void)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
return(__regBasePri); return(__regBasePri);
} }
@ -222,7 +222,7 @@ static __INLINE uint32_t __get_BASEPRI(void)
*/ */
static __INLINE void __set_BASEPRI(uint32_t basePri) static __INLINE void __set_BASEPRI(uint32_t basePri)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
__regBasePri = (basePri & 0xff); __regBasePri = (basePri & 0xff);
} }
@ -235,7 +235,7 @@ static __INLINE void __set_BASEPRI(uint32_t basePri)
*/ */
static __INLINE uint32_t __get_FAULTMASK(void) static __INLINE uint32_t __get_FAULTMASK(void)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
return(__regFaultMask); return(__regFaultMask);
} }
@ -248,7 +248,7 @@ static __INLINE uint32_t __get_FAULTMASK(void)
*/ */
static __INLINE void __set_FAULTMASK(uint32_t faultMask) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
__regFaultMask = (faultMask & (uint32_t)1); __regFaultMask = (faultMask & (uint32_t)1);
} }
@ -266,7 +266,7 @@ static __INLINE void __set_FAULTMASK(uint32_t faultMask)
static __INLINE uint32_t __get_FPSCR(void) static __INLINE uint32_t __get_FPSCR(void)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
return(__regfpscr); return(__regfpscr);
#else #else
return(0); return(0);
@ -283,7 +283,7 @@ static __INLINE uint32_t __get_FPSCR(void)
static __INLINE void __set_FPSCR(uint32_t fpscr) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
__regfpscr = (fpscr); __regfpscr = (fpscr);
#endif #endif
} }
@ -306,7 +306,7 @@ static __INLINE void __set_FPSCR(uint32_t fpscr)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
{ {
__ASM volatile ("cpsie i"); asm volatile ("cpsie i");
} }
@ -317,7 +317,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void)
{ {
__ASM volatile ("cpsid i"); asm volatile ("cpsid i");
} }
@ -331,7 +331,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) ); asm volatile ("MRS %0, control" : "=r" (result) );
return(result); return(result);
} }
@ -344,7 +344,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control) __attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control)
{ {
__ASM volatile ("MSR control, %0" : : "r" (control) ); asm volatile ("MSR control, %0" : : "r" (control) );
} }
@ -358,7 +358,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_IPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) ); asm volatile ("MRS %0, ipsr" : "=r" (result) );
return(result); return(result);
} }
@ -373,7 +373,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_APSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, apsr" : "=r" (result) ); asm volatile ("MRS %0, apsr" : "=r" (result) );
return(result); return(result);
} }
@ -388,7 +388,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_xPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, xpsr" : "=r" (result) ); asm volatile ("MRS %0, xpsr" : "=r" (result) );
return(result); return(result);
} }
@ -403,7 +403,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, psp\n" : "=r" (result) ); asm volatile ("MRS %0, psp\n" : "=r" (result) );
return(result); return(result);
} }
@ -416,7 +416,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack) __attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) ); asm volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) );
} }
@ -430,7 +430,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, msp\n" : "=r" (result) ); asm volatile ("MRS %0, msp\n" : "=r" (result) );
return(result); return(result);
} }
@ -443,7 +443,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack) __attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) ); asm volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) );
} }
@ -457,7 +457,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, primask" : "=r" (result) ); asm volatile ("MRS %0, primask" : "=r" (result) );
return(result); return(result);
} }
@ -470,7 +470,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask) __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
__ASM volatile ("MSR primask, %0" : : "r" (priMask) ); asm volatile ("MSR primask, %0" : : "r" (priMask) );
} }
@ -483,7 +483,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t p
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
{ {
__ASM volatile ("cpsie f"); asm volatile ("cpsie f");
} }
@ -494,7 +494,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void)
{ {
__ASM volatile ("cpsid f"); asm volatile ("cpsid f");
} }
@ -508,7 +508,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, basepri_max" : "=r" (result) ); asm volatile ("MRS %0, basepri_max" : "=r" (result) );
return(result); return(result);
} }
@ -521,7 +521,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value) __attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value)
{ {
__ASM volatile ("MSR basepri, %0" : : "r" (value) ); asm volatile ("MSR basepri, %0" : : "r" (value) );
} }
@ -535,7 +535,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, faultmask" : "=r" (result) ); asm volatile ("MRS %0, faultmask" : "=r" (result) );
return(result); return(result);
} }
@ -548,7 +548,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask) __attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
__ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) ); asm volatile ("MSR faultmask, %0" : : "r" (faultMask) );
} }
#endif /* (__CORTEX_M >= 0x03) */ #endif /* (__CORTEX_M >= 0x03) */
@ -567,7 +567,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
uint32_t result; uint32_t result;
__ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); asm volatile ("VMRS %0, fpscr" : "=r" (result) );
return(result); return(result);
#else #else
return(0); return(0);
@ -584,7 +584,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
__attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr) __attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
__ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) ); asm volatile ("VMSR fpscr, %0" : : "r" (fpscr) );
#endif #endif
} }

View File

@ -48,7 +48,7 @@
*/ */
static __INLINE uint32_t __get_CONTROL(void) static __INLINE uint32_t __get_CONTROL(void)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
return(__regControl); return(__regControl);
} }
@ -61,7 +61,7 @@ static __INLINE uint32_t __get_CONTROL(void)
*/ */
static __INLINE void __set_CONTROL(uint32_t control) static __INLINE void __set_CONTROL(uint32_t control)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
__regControl = control; __regControl = control;
} }
@ -74,7 +74,7 @@ static __INLINE void __set_CONTROL(uint32_t control)
*/ */
static __INLINE uint32_t __get_IPSR(void) static __INLINE uint32_t __get_IPSR(void)
{ {
register uint32_t __regIPSR __ASM("ipsr"); register uint32_t __regIPSR asm("ipsr");
return(__regIPSR); return(__regIPSR);
} }
@ -87,7 +87,7 @@ static __INLINE uint32_t __get_IPSR(void)
*/ */
static __INLINE uint32_t __get_APSR(void) static __INLINE uint32_t __get_APSR(void)
{ {
register uint32_t __regAPSR __ASM("apsr"); register uint32_t __regAPSR asm("apsr");
return(__regAPSR); return(__regAPSR);
} }
@ -100,7 +100,7 @@ static __INLINE uint32_t __get_APSR(void)
*/ */
static __INLINE uint32_t __get_xPSR(void) static __INLINE uint32_t __get_xPSR(void)
{ {
register uint32_t __regXPSR __ASM("xpsr"); register uint32_t __regXPSR asm("xpsr");
return(__regXPSR); return(__regXPSR);
} }
@ -113,7 +113,7 @@ static __INLINE uint32_t __get_xPSR(void)
*/ */
static __INLINE uint32_t __get_PSP(void) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
return(__regProcessStackPointer); return(__regProcessStackPointer);
} }
@ -126,7 +126,7 @@ static __INLINE uint32_t __get_PSP(void)
*/ */
static __INLINE void __set_PSP(uint32_t topOfProcStack) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
__regProcessStackPointer = topOfProcStack; __regProcessStackPointer = topOfProcStack;
} }
@ -139,7 +139,7 @@ static __INLINE void __set_PSP(uint32_t topOfProcStack)
*/ */
static __INLINE uint32_t __get_MSP(void) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
return(__regMainStackPointer); return(__regMainStackPointer);
} }
@ -152,7 +152,7 @@ static __INLINE uint32_t __get_MSP(void)
*/ */
static __INLINE void __set_MSP(uint32_t topOfMainStack) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
__regMainStackPointer = topOfMainStack; __regMainStackPointer = topOfMainStack;
} }
@ -165,7 +165,7 @@ static __INLINE void __set_MSP(uint32_t topOfMainStack)
*/ */
static __INLINE uint32_t __get_PRIMASK(void) static __INLINE uint32_t __get_PRIMASK(void)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
return(__regPriMask); return(__regPriMask);
} }
@ -178,7 +178,7 @@ static __INLINE uint32_t __get_PRIMASK(void)
*/ */
static __INLINE void __set_PRIMASK(uint32_t priMask) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
__regPriMask = (priMask); __regPriMask = (priMask);
} }
@ -209,7 +209,7 @@ static __INLINE void __set_PRIMASK(uint32_t priMask)
*/ */
static __INLINE uint32_t __get_BASEPRI(void) static __INLINE uint32_t __get_BASEPRI(void)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
return(__regBasePri); return(__regBasePri);
} }
@ -222,7 +222,7 @@ static __INLINE uint32_t __get_BASEPRI(void)
*/ */
static __INLINE void __set_BASEPRI(uint32_t basePri) static __INLINE void __set_BASEPRI(uint32_t basePri)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
__regBasePri = (basePri & 0xff); __regBasePri = (basePri & 0xff);
} }
@ -235,7 +235,7 @@ static __INLINE void __set_BASEPRI(uint32_t basePri)
*/ */
static __INLINE uint32_t __get_FAULTMASK(void) static __INLINE uint32_t __get_FAULTMASK(void)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
return(__regFaultMask); return(__regFaultMask);
} }
@ -248,7 +248,7 @@ static __INLINE uint32_t __get_FAULTMASK(void)
*/ */
static __INLINE void __set_FAULTMASK(uint32_t faultMask) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
__regFaultMask = (faultMask & (uint32_t)1); __regFaultMask = (faultMask & (uint32_t)1);
} }
@ -266,7 +266,7 @@ static __INLINE void __set_FAULTMASK(uint32_t faultMask)
static __INLINE uint32_t __get_FPSCR(void) static __INLINE uint32_t __get_FPSCR(void)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
return(__regfpscr); return(__regfpscr);
#else #else
return(0); return(0);
@ -283,7 +283,7 @@ static __INLINE uint32_t __get_FPSCR(void)
static __INLINE void __set_FPSCR(uint32_t fpscr) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
__regfpscr = (fpscr); __regfpscr = (fpscr);
#endif #endif
} }
@ -306,7 +306,7 @@ static __INLINE void __set_FPSCR(uint32_t fpscr)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
{ {
__ASM volatile ("cpsie i"); asm volatile ("cpsie i");
} }
@ -317,7 +317,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void)
{ {
__ASM volatile ("cpsid i"); asm volatile ("cpsid i");
} }
@ -331,7 +331,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) ); asm volatile ("MRS %0, control" : "=r" (result) );
return(result); return(result);
} }
@ -344,7 +344,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control) __attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control)
{ {
__ASM volatile ("MSR control, %0" : : "r" (control) ); asm volatile ("MSR control, %0" : : "r" (control) );
} }
@ -358,7 +358,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_IPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) ); asm volatile ("MRS %0, ipsr" : "=r" (result) );
return(result); return(result);
} }
@ -373,7 +373,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_APSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, apsr" : "=r" (result) ); asm volatile ("MRS %0, apsr" : "=r" (result) );
return(result); return(result);
} }
@ -388,7 +388,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_xPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, xpsr" : "=r" (result) ); asm volatile ("MRS %0, xpsr" : "=r" (result) );
return(result); return(result);
} }
@ -403,7 +403,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, psp\n" : "=r" (result) ); asm volatile ("MRS %0, psp\n" : "=r" (result) );
return(result); return(result);
} }
@ -416,7 +416,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack) __attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) ); asm volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) );
} }
@ -430,7 +430,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, msp\n" : "=r" (result) ); asm volatile ("MRS %0, msp\n" : "=r" (result) );
return(result); return(result);
} }
@ -443,7 +443,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack) __attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) ); asm volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) );
} }
@ -457,7 +457,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, primask" : "=r" (result) ); asm volatile ("MRS %0, primask" : "=r" (result) );
return(result); return(result);
} }
@ -470,7 +470,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask) __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
__ASM volatile ("MSR primask, %0" : : "r" (priMask) ); asm volatile ("MSR primask, %0" : : "r" (priMask) );
} }
@ -483,7 +483,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t p
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
{ {
__ASM volatile ("cpsie f"); asm volatile ("cpsie f");
} }
@ -494,7 +494,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void)
{ {
__ASM volatile ("cpsid f"); asm volatile ("cpsid f");
} }
@ -508,7 +508,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, basepri_max" : "=r" (result) ); asm volatile ("MRS %0, basepri_max" : "=r" (result) );
return(result); return(result);
} }
@ -521,7 +521,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value) __attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value)
{ {
__ASM volatile ("MSR basepri, %0" : : "r" (value) ); asm volatile ("MSR basepri, %0" : : "r" (value) );
} }
@ -535,7 +535,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, faultmask" : "=r" (result) ); asm volatile ("MRS %0, faultmask" : "=r" (result) );
return(result); return(result);
} }
@ -548,7 +548,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask) __attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
__ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) ); asm volatile ("MSR faultmask, %0" : : "r" (faultMask) );
} }
#endif /* (__CORTEX_M >= 0x03) */ #endif /* (__CORTEX_M >= 0x03) */
@ -567,7 +567,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
uint32_t result; uint32_t result;
__ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); asm volatile ("VMRS %0, fpscr" : "=r" (result) );
return(result); return(result);
#else #else
return(0); return(0);
@ -584,7 +584,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
__attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr) __attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
__ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) ); asm volatile ("VMSR fpscr, %0" : : "r" (fpscr) );
#endif #endif
} }

View File

@ -48,7 +48,7 @@
*/ */
static __INLINE uint32_t __get_CONTROL(void) static __INLINE uint32_t __get_CONTROL(void)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
return(__regControl); return(__regControl);
} }
@ -61,7 +61,7 @@ static __INLINE uint32_t __get_CONTROL(void)
*/ */
static __INLINE void __set_CONTROL(uint32_t control) static __INLINE void __set_CONTROL(uint32_t control)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
__regControl = control; __regControl = control;
} }
@ -74,7 +74,7 @@ static __INLINE void __set_CONTROL(uint32_t control)
*/ */
static __INLINE uint32_t __get_IPSR(void) static __INLINE uint32_t __get_IPSR(void)
{ {
register uint32_t __regIPSR __ASM("ipsr"); register uint32_t __regIPSR asm("ipsr");
return(__regIPSR); return(__regIPSR);
} }
@ -87,7 +87,7 @@ static __INLINE uint32_t __get_IPSR(void)
*/ */
static __INLINE uint32_t __get_APSR(void) static __INLINE uint32_t __get_APSR(void)
{ {
register uint32_t __regAPSR __ASM("apsr"); register uint32_t __regAPSR asm("apsr");
return(__regAPSR); return(__regAPSR);
} }
@ -100,7 +100,7 @@ static __INLINE uint32_t __get_APSR(void)
*/ */
static __INLINE uint32_t __get_xPSR(void) static __INLINE uint32_t __get_xPSR(void)
{ {
register uint32_t __regXPSR __ASM("xpsr"); register uint32_t __regXPSR asm("xpsr");
return(__regXPSR); return(__regXPSR);
} }
@ -113,7 +113,7 @@ static __INLINE uint32_t __get_xPSR(void)
*/ */
static __INLINE uint32_t __get_PSP(void) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
return(__regProcessStackPointer); return(__regProcessStackPointer);
} }
@ -126,7 +126,7 @@ static __INLINE uint32_t __get_PSP(void)
*/ */
static __INLINE void __set_PSP(uint32_t topOfProcStack) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
__regProcessStackPointer = topOfProcStack; __regProcessStackPointer = topOfProcStack;
} }
@ -139,7 +139,7 @@ static __INLINE void __set_PSP(uint32_t topOfProcStack)
*/ */
static __INLINE uint32_t __get_MSP(void) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
return(__regMainStackPointer); return(__regMainStackPointer);
} }
@ -152,7 +152,7 @@ static __INLINE uint32_t __get_MSP(void)
*/ */
static __INLINE void __set_MSP(uint32_t topOfMainStack) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
__regMainStackPointer = topOfMainStack; __regMainStackPointer = topOfMainStack;
} }
@ -165,7 +165,7 @@ static __INLINE void __set_MSP(uint32_t topOfMainStack)
*/ */
static __INLINE uint32_t __get_PRIMASK(void) static __INLINE uint32_t __get_PRIMASK(void)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
return(__regPriMask); return(__regPriMask);
} }
@ -178,7 +178,7 @@ static __INLINE uint32_t __get_PRIMASK(void)
*/ */
static __INLINE void __set_PRIMASK(uint32_t priMask) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
__regPriMask = (priMask); __regPriMask = (priMask);
} }
@ -209,7 +209,7 @@ static __INLINE void __set_PRIMASK(uint32_t priMask)
*/ */
static __INLINE uint32_t __get_BASEPRI(void) static __INLINE uint32_t __get_BASEPRI(void)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
return(__regBasePri); return(__regBasePri);
} }
@ -222,7 +222,7 @@ static __INLINE uint32_t __get_BASEPRI(void)
*/ */
static __INLINE void __set_BASEPRI(uint32_t basePri) static __INLINE void __set_BASEPRI(uint32_t basePri)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
__regBasePri = (basePri & 0xff); __regBasePri = (basePri & 0xff);
} }
@ -235,7 +235,7 @@ static __INLINE void __set_BASEPRI(uint32_t basePri)
*/ */
static __INLINE uint32_t __get_FAULTMASK(void) static __INLINE uint32_t __get_FAULTMASK(void)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
return(__regFaultMask); return(__regFaultMask);
} }
@ -248,7 +248,7 @@ static __INLINE uint32_t __get_FAULTMASK(void)
*/ */
static __INLINE void __set_FAULTMASK(uint32_t faultMask) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
__regFaultMask = (faultMask & (uint32_t)1); __regFaultMask = (faultMask & (uint32_t)1);
} }
@ -266,7 +266,7 @@ static __INLINE void __set_FAULTMASK(uint32_t faultMask)
static __INLINE uint32_t __get_FPSCR(void) static __INLINE uint32_t __get_FPSCR(void)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
return(__regfpscr); return(__regfpscr);
#else #else
return(0); return(0);
@ -283,7 +283,7 @@ static __INLINE uint32_t __get_FPSCR(void)
static __INLINE void __set_FPSCR(uint32_t fpscr) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
__regfpscr = (fpscr); __regfpscr = (fpscr);
#endif #endif
} }
@ -306,7 +306,7 @@ static __INLINE void __set_FPSCR(uint32_t fpscr)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
{ {
__ASM volatile ("cpsie i"); asm volatile ("cpsie i");
} }
@ -317,7 +317,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_irq(void)
{ {
__ASM volatile ("cpsid i"); asm volatile ("cpsid i");
} }
@ -331,7 +331,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) ); asm volatile ("MRS %0, control" : "=r" (result) );
return(result); return(result);
} }
@ -344,7 +344,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_CONTROL(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control) __attribute__( ( always_inline ) ) static __INLINE void __set_CONTROL(uint32_t control)
{ {
__ASM volatile ("MSR control, %0" : : "r" (control) ); asm volatile ("MSR control, %0" : : "r" (control) );
} }
@ -358,7 +358,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_IPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) ); asm volatile ("MRS %0, ipsr" : "=r" (result) );
return(result); return(result);
} }
@ -373,7 +373,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_APSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, apsr" : "=r" (result) ); asm volatile ("MRS %0, apsr" : "=r" (result) );
return(result); return(result);
} }
@ -388,7 +388,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_xPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, xpsr" : "=r" (result) ); asm volatile ("MRS %0, xpsr" : "=r" (result) );
return(result); return(result);
} }
@ -403,7 +403,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, psp\n" : "=r" (result) ); asm volatile ("MRS %0, psp\n" : "=r" (result) );
return(result); return(result);
} }
@ -416,7 +416,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack) __attribute__( ( always_inline ) ) static __INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) ); asm volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) );
} }
@ -430,7 +430,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, msp\n" : "=r" (result) ); asm volatile ("MRS %0, msp\n" : "=r" (result) );
return(result); return(result);
} }
@ -443,7 +443,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_MSP(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack) __attribute__( ( always_inline ) ) static __INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) ); asm volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) );
} }
@ -457,7 +457,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, primask" : "=r" (result) ); asm volatile ("MRS %0, primask" : "=r" (result) );
return(result); return(result);
} }
@ -470,7 +470,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_PRIMASK(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask) __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t priMask)
{ {
__ASM volatile ("MSR primask, %0" : : "r" (priMask) ); asm volatile ("MSR primask, %0" : : "r" (priMask) );
} }
@ -483,7 +483,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __set_PRIMASK(uint32_t p
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
{ {
__ASM volatile ("cpsie f"); asm volatile ("cpsie f");
} }
@ -494,7 +494,7 @@ __attribute__( ( always_inline ) ) static __INLINE void __enable_fault_irq(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void) __attribute__( ( always_inline ) ) static __INLINE void __disable_fault_irq(void)
{ {
__ASM volatile ("cpsid f"); asm volatile ("cpsid f");
} }
@ -508,7 +508,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, basepri_max" : "=r" (result) ); asm volatile ("MRS %0, basepri_max" : "=r" (result) );
return(result); return(result);
} }
@ -521,7 +521,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_BASEPRI(void)
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value) __attribute__( ( always_inline ) ) static __INLINE void __set_BASEPRI(uint32_t value)
{ {
__ASM volatile ("MSR basepri, %0" : : "r" (value) ); asm volatile ("MSR basepri, %0" : : "r" (value) );
} }
@ -535,7 +535,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, faultmask" : "=r" (result) ); asm volatile ("MRS %0, faultmask" : "=r" (result) );
return(result); return(result);
} }
@ -548,7 +548,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FAULTMASK(void
*/ */
__attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask) __attribute__( ( always_inline ) ) static __INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
__ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) ); asm volatile ("MSR faultmask, %0" : : "r" (faultMask) );
} }
#endif /* (__CORTEX_M >= 0x03) */ #endif /* (__CORTEX_M >= 0x03) */
@ -567,7 +567,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
uint32_t result; uint32_t result;
__ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); asm volatile ("VMRS %0, fpscr" : "=r" (result) );
return(result); return(result);
#else #else
return(0); return(0);
@ -584,7 +584,7 @@ __attribute__( ( always_inline ) ) static __INLINE uint32_t __get_FPSCR(void)
__attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr) __attribute__( ( always_inline ) ) static __INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
__ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) ); asm volatile ("VMSR fpscr, %0" : : "r" (fpscr) );
#endif #endif
} }

View File

@ -49,7 +49,7 @@
*/ */
__STATIC_INLINE uint32_t __get_CONTROL(void) __STATIC_INLINE uint32_t __get_CONTROL(void)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
return(__regControl); return(__regControl);
} }
@ -62,7 +62,7 @@ __STATIC_INLINE uint32_t __get_CONTROL(void)
*/ */
__STATIC_INLINE void __set_CONTROL(uint32_t control) __STATIC_INLINE void __set_CONTROL(uint32_t control)
{ {
register uint32_t __regControl __ASM("control"); register uint32_t __regControl asm("control");
__regControl = control; __regControl = control;
} }
@ -75,7 +75,7 @@ __STATIC_INLINE void __set_CONTROL(uint32_t control)
*/ */
__STATIC_INLINE uint32_t __get_IPSR(void) __STATIC_INLINE uint32_t __get_IPSR(void)
{ {
register uint32_t __regIPSR __ASM("ipsr"); register uint32_t __regIPSR asm("ipsr");
return(__regIPSR); return(__regIPSR);
} }
@ -88,7 +88,7 @@ __STATIC_INLINE uint32_t __get_IPSR(void)
*/ */
__STATIC_INLINE uint32_t __get_APSR(void) __STATIC_INLINE uint32_t __get_APSR(void)
{ {
register uint32_t __regAPSR __ASM("apsr"); register uint32_t __regAPSR asm("apsr");
return(__regAPSR); return(__regAPSR);
} }
@ -101,7 +101,7 @@ __STATIC_INLINE uint32_t __get_APSR(void)
*/ */
__STATIC_INLINE uint32_t __get_xPSR(void) __STATIC_INLINE uint32_t __get_xPSR(void)
{ {
register uint32_t __regXPSR __ASM("xpsr"); register uint32_t __regXPSR asm("xpsr");
return(__regXPSR); return(__regXPSR);
} }
@ -114,7 +114,7 @@ __STATIC_INLINE uint32_t __get_xPSR(void)
*/ */
__STATIC_INLINE uint32_t __get_PSP(void) __STATIC_INLINE uint32_t __get_PSP(void)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
return(__regProcessStackPointer); return(__regProcessStackPointer);
} }
@ -127,7 +127,7 @@ __STATIC_INLINE uint32_t __get_PSP(void)
*/ */
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
register uint32_t __regProcessStackPointer __ASM("psp"); register uint32_t __regProcessStackPointer asm("psp");
__regProcessStackPointer = topOfProcStack; __regProcessStackPointer = topOfProcStack;
} }
@ -140,7 +140,7 @@ __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
*/ */
__STATIC_INLINE uint32_t __get_MSP(void) __STATIC_INLINE uint32_t __get_MSP(void)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
return(__regMainStackPointer); return(__regMainStackPointer);
} }
@ -153,7 +153,7 @@ __STATIC_INLINE uint32_t __get_MSP(void)
*/ */
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
register uint32_t __regMainStackPointer __ASM("msp"); register uint32_t __regMainStackPointer asm("msp");
__regMainStackPointer = topOfMainStack; __regMainStackPointer = topOfMainStack;
} }
@ -166,7 +166,7 @@ __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
*/ */
__STATIC_INLINE uint32_t __get_PRIMASK(void) __STATIC_INLINE uint32_t __get_PRIMASK(void)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
return(__regPriMask); return(__regPriMask);
} }
@ -179,7 +179,7 @@ __STATIC_INLINE uint32_t __get_PRIMASK(void)
*/ */
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
{ {
register uint32_t __regPriMask __ASM("primask"); register uint32_t __regPriMask asm("primask");
__regPriMask = (priMask); __regPriMask = (priMask);
} }
@ -210,7 +210,7 @@ __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
*/ */
__STATIC_INLINE uint32_t __get_BASEPRI(void) __STATIC_INLINE uint32_t __get_BASEPRI(void)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
return(__regBasePri); return(__regBasePri);
} }
@ -223,7 +223,7 @@ __STATIC_INLINE uint32_t __get_BASEPRI(void)
*/ */
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri) __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
{ {
register uint32_t __regBasePri __ASM("basepri"); register uint32_t __regBasePri asm("basepri");
__regBasePri = (basePri & 0xff); __regBasePri = (basePri & 0xff);
} }
@ -236,7 +236,7 @@ __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
*/ */
__STATIC_INLINE uint32_t __get_FAULTMASK(void) __STATIC_INLINE uint32_t __get_FAULTMASK(void)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
return(__regFaultMask); return(__regFaultMask);
} }
@ -249,7 +249,7 @@ __STATIC_INLINE uint32_t __get_FAULTMASK(void)
*/ */
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
register uint32_t __regFaultMask __ASM("faultmask"); register uint32_t __regFaultMask asm("faultmask");
__regFaultMask = (faultMask & (uint32_t)1); __regFaultMask = (faultMask & (uint32_t)1);
} }
@ -267,7 +267,7 @@ __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
__STATIC_INLINE uint32_t __get_FPSCR(void) __STATIC_INLINE uint32_t __get_FPSCR(void)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
return(__regfpscr); return(__regfpscr);
#else #else
return(0); return(0);
@ -284,7 +284,7 @@ __STATIC_INLINE uint32_t __get_FPSCR(void)
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
register uint32_t __regfpscr __ASM("fpscr"); register uint32_t __regfpscr asm("fpscr");
__regfpscr = (fpscr); __regfpscr = (fpscr);
#endif #endif
} }
@ -314,7 +314,7 @@ __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void) __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
{ {
__ASM volatile ("cpsie i" : : : "memory"); asm volatile ("cpsie i" : : : "memory");
} }
@ -325,7 +325,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void) __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)
{ {
__ASM volatile ("cpsid i" : : : "memory"); asm volatile ("cpsid i" : : : "memory");
} }
@ -339,7 +339,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) ); asm volatile ("MRS %0, control" : "=r" (result) );
return(result); return(result);
} }
@ -352,7 +352,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CONTROL(uint32_t control) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CONTROL(uint32_t control)
{ {
__ASM volatile ("MSR control, %0" : : "r" (control) ); asm volatile ("MSR control, %0" : : "r" (control) );
} }
@ -366,7 +366,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) ); asm volatile ("MRS %0, ipsr" : "=r" (result) );
return(result); return(result);
} }
@ -381,7 +381,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, apsr" : "=r" (result) ); asm volatile ("MRS %0, apsr" : "=r" (result) );
return(result); return(result);
} }
@ -396,7 +396,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, xpsr" : "=r" (result) ); asm volatile ("MRS %0, xpsr" : "=r" (result) );
return(result); return(result);
} }
@ -411,7 +411,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, psp\n" : "=r" (result) ); asm volatile ("MRS %0, psp\n" : "=r" (result) );
return(result); return(result);
} }
@ -424,7 +424,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{ {
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) ); asm volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) );
} }
@ -438,7 +438,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
{ {
register uint32_t result; register uint32_t result;
__ASM volatile ("MRS %0, msp\n" : "=r" (result) ); asm volatile ("MRS %0, msp\n" : "=r" (result) );
return(result); return(result);
} }
@ -451,7 +451,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{ {
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) ); asm volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) );
} }
@ -465,7 +465,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, primask" : "=r" (result) ); asm volatile ("MRS %0, primask" : "=r" (result) );
return(result); return(result);
} }
@ -478,7 +478,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
{ {
__ASM volatile ("MSR primask, %0" : : "r" (priMask) ); asm volatile ("MSR primask, %0" : : "r" (priMask) );
} }
@ -491,7 +491,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(uint32_t p
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_fault_irq(void) __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_fault_irq(void)
{ {
__ASM volatile ("cpsie f" : : : "memory"); asm volatile ("cpsie f" : : : "memory");
} }
@ -502,7 +502,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_fault_irq(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_fault_irq(void) __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_fault_irq(void)
{ {
__ASM volatile ("cpsid f" : : : "memory"); asm volatile ("cpsid f" : : : "memory");
} }
@ -516,7 +516,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_BASEPRI(void)
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, basepri_max" : "=r" (result) ); asm volatile ("MRS %0, basepri_max" : "=r" (result) );
return(result); return(result);
} }
@ -529,7 +529,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_BASEPRI(void)
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI(uint32_t value) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI(uint32_t value)
{ {
__ASM volatile ("MSR basepri, %0" : : "r" (value) ); asm volatile ("MSR basepri, %0" : : "r" (value) );
} }
@ -543,7 +543,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FAULTMASK(void
{ {
uint32_t result; uint32_t result;
__ASM volatile ("MRS %0, faultmask" : "=r" (result) ); asm volatile ("MRS %0, faultmask" : "=r" (result) );
return(result); return(result);
} }
@ -556,7 +556,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FAULTMASK(void
*/ */
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
{ {
__ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) ); asm volatile ("MSR faultmask, %0" : : "r" (faultMask) );
} }
#endif /* (__CORTEX_M >= 0x03) */ #endif /* (__CORTEX_M >= 0x03) */
@ -575,7 +575,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(void)
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
uint32_t result; uint32_t result;
__ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); asm volatile ("VMRS %0, fpscr" : "=r" (result) );
return(result); return(result);
#else #else
return(0); return(0);
@ -592,7 +592,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(void)
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr) __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
{ {
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
__ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) ); asm volatile ("VMSR fpscr, %0" : : "r" (fpscr) );
#endif #endif
} }