Hi Friends,
while working with LPC2148 controller of USB, I got this error in keil Uvision 4 software.
I'm trying to read cpsr and set cpsr with these function. but i have problem using them in keil uvision 4.
static inline unsigned __get_cpsr(void)
{
unsigned long retval;
asm volatile (" mrs %0, cpsr" : "=r" (retval) : );
return retval;
}
static inline void __set_cpsr(unsigned val)
{
asm volatile (" msr cpsr, %0": :"r" (val));
}
and i get this error:
error: #65: expected a ";"
error: #20: identifier "asm" is undefined
so i used __inline and __asm and now i get this error:
source\main.c(94): error: #18: expected a ")"
source\main.c(94): error: #18: expected a ")"
Any idea on how to fix it? or what is the steps to move these functions in a separate asm file which seems to be a solution,
Thanks