AnsweredAssumed Answered

special macros

Question asked by mohamed on Jul 23, 2009
Latest reply on Jul 23, 2009 by AndyC

i have used these two macros for setting ang clearing bits for certian registers and they worked good with me and i have tested there work with many registers


#define SYSREG_CLR(sysreg,bit) __builtin_sysreg_write(sysreg, __builtin_sysreg_read(sysreg)&~bit)   //macro used to clear the bits
#define SYSREG_SET(sysreg,bit) __builtin_sysreg_write(sysreg, __builtin_sysreg_read(sysreg)|~bit)   //macro used to set bits

the problems appeared when i used them in a certain application where i need to access a certain interrupt registers such as  IMASKH


and when  write the name of the bit according to the hardware refrence of the ADSP_TS201 the compiler told me that they are unidentified

and i have inclued the important eader files such as  defts201.h    builtins.h   sysreg.h






or when i tried to test the value of a bit in ILATH register it also give me an error





int x;

x= __builtin_sysreg_read(__ILATH);



it also till be that it is unidentified

and i used these syntax many times with other registers and other bits as there name is listed in the hardware refernce and no error occured


please try to help me