From: lottaviano Date: Wed, 31 Mar 2010 04:57:22 +0000 (+0000) Subject: Add support for serial driver on ATMega168. X-Git-Tag: 2.5.0~571 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ba732cee02711f649d67ed68b539d2f830a844f2;p=bertos.git Add support for serial driver on ATMega168. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3337 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/avr/drv/ser_avr.c b/bertos/cpu/avr/drv/ser_avr.c index c7c36ff7..23c4b076 100644 --- a/bertos/cpu/avr/drv/ser_avr.c +++ b/bertos/cpu/avr/drv/ser_avr.c @@ -86,7 +86,7 @@ #define BIT_RXEN1 RXEN1 #define BIT_TXEN1 TXEN1 #define BIT_UDRIE1 UDRIE1 -#elif CPU_AVR_ATMEGA328P +#elif CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P #define BIT_RXCIE0 RXCIE0 #define BIT_RXEN0 RXEN0 #define BIT_TXEN0 TXEN0 @@ -282,7 +282,7 @@ /* USART register definitions */ #if CPU_AVR_ATMEGA64 || CPU_AVR_ATMEGA128 || CPU_AVR_ATMEGA1281 #define AVR_HAS_UART1 1 -#elif CPU_AVR_ATMEGA328P +#elif CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P #define AVR_HAS_UART1 0 #define USART0_UDRE_vect USART_UDRE_vect #define USART0_RX_vect USART_RX_vect diff --git a/bertos/cpu/avr/drv/ser_avr.h b/bertos/cpu/avr/drv/ser_avr.h index 5f4e8f6a..a5a74b52 100644 --- a/bertos/cpu/avr/drv/ser_avr.h +++ b/bertos/cpu/avr/drv/ser_avr.h @@ -91,7 +91,7 @@ enum SER_UART0, SER_UART1, SER_SPI, -#elif CPU_AVR_ATMEGA103 || CPU_AVR_ATMEGA8 || CPU_AVR_ATMEGA328P +#elif CPU_AVR_ATMEGA103 || CPU_AVR_ATMEGA8 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P SER_UART0, SER_SPI, #else diff --git a/bertos/drv/ser.h b/bertos/drv/ser.h index fe05b4d5..ad27f51c 100644 --- a/bertos/drv/ser.h +++ b/bertos/drv/ser.h @@ -40,7 +40,7 @@ * $WIZ$ module_depends = "kfile", "timer" * $WIZ$ module_configuration = "bertos/cfg/cfg_ser.h" * $WIZ$ module_hw = "bertos/hw/hw_ser.h" - * $WIZ$ module_supports = "not atmega103 and not atmega168 " + * $WIZ$ module_supports = "not atmega103" * $WIZ$ module_supports += "and not atmega32 and not atmega8" */