TestDoxygen
1.0.21
Test for Doxygen
|
00001 00004 /* my assembler definitions of CBI and SBI 00005 These are deprecated in the WINavr include files 00006 The compiler will complain if the register address is too big 00007 00008 MRU JR 100207 00009 100207 corrected error in clrbit 00010 091121 added #ifndef _MYPORTBITS_H 00011 */ 00012 #ifndef _MYPORTBITS_H 00013 #define _MYPORTBITS_H 00014 /* For addresses <= 0x1f */ 00015 #define sbi(REG,BIT) \ 00016 __asm__ __volatile__ \ 00017 ("sbi %0, %1" :: "I" (_SFR_IO_ADDR(REG)), "I" (BIT)) 00018 00019 00020 #define cbi(REG,BIT) __asm__ __volatile__ \ 00021 ("cbi %0, %1" :: "I" (_SFR_IO_ADDR(REG)), "I" (BIT)) 00022 00023 /* For addresses >= 0x1f */ 00024 #define setbit(REG, BIT) REG |= (1 << BIT) 00025 00026 #define clrbit(REG, BIT) REG &= ~(1 << BIT) 00027 00028 #endif