[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] cbi/sbi
From: |
Trampas |
Subject: |
RE: [avr-gcc-list] cbi/sbi |
Date: |
Mon, 18 Jul 2005 06:43:26 -0400 |
I always try to wrap compiler specific stuff with macros like:
#define bit_clear(x,y) x&= ~(1<<y) //cbi(x,y)
#define bit_set(x,y) x|= (1<<y)//sbi(x,y)
Thus when cbi and sbi was removed I just changed code to above and now the
compiler is smart enough to replace the code with sbi and cbi where
appropriate. This way is much better as I do not have to know when sbi and
cbi will work that is the bit_clear and bit_set macros always work.
Regards,
Trampas Stern
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Reza
Naima
Sent: Monday, July 18, 2005 3:53 AM
To: address@hidden
Subject: [avr-gcc-list] cbi/sbi
Ok, so I found out the hard way that cbi/sbi were depreciated. I
finally came across a huge thread where people were complaining about it
dissapearing. Given that there are a huge number of emails in that
thread, I was hoping someone could just tell me what replacement of
cbi/sbi is, or point me to some documentation that describes it. After
a few hours of trying to make cbi/sbi work, I just decided to revert to
an older version of the compiler (got to love sourceforge), and all is
good in my world. But moving forward, I would like to start using the
contemporary version of the compiler again.
Thanks,
Reza
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list