X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftwi.c;h=52112d2f5d7910e26b6ac595dc7a46b3a52f6b48;hb=5f3952176a4e9a00ca8dd5ec4a6b994958f89e0a;hp=d0c6537428369569fd50cea491eeaf89dbf719ac;hpb=bcf38f772b397e7a8ba781a69aacb9380e54b32a;p=bertos.git diff --git a/drv/twi.c b/drv/twi.c old mode 100755 new mode 100644 index d0c65374..52112d2f --- a/drv/twi.c +++ b/drv/twi.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.8 2007/06/07 14:35:12 batt + *#* Merge from project_ks. + *#* *#* Revision 1.7 2006/07/19 12:56:26 bernie *#* Convert to new Doxygen style. *#* @@ -43,7 +46,7 @@ #include #include #include // BV() -#include +#include /* CLOCK_FREQ */ #include #include @@ -238,12 +241,12 @@ void twi_init(void) * probably due to some unwanted interaction between the * port pin and the TWI lines. */ -#if defined(__AVR_ATmega64__) +#if CPU_AVR_ATMEGA64 || CPU_AVR_ATMEGA128 || CPU_AVR_ATMEGA1281 PORTD |= BV(PD0) | BV(PD1); - DDRD |= BV(PD0) | BV(PD1); -#elif defined(__AVR_ATmega8__) + DDRD |= BV(PD0) | BV(PD1); +#elif CPU_AVR_ATMEGA8 PORTC |= BV(PC4) | BV(PC5); - DDRC |= BV(PC4) | BV(PC5); + DDRC |= BV(PC4) | BV(PC5); #else #error Unsupported architecture #endif