Add support for serial driver on ATMega168.
authorlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 04:57:22 +0000 (04:57 +0000)
committerlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 04:57:22 +0000 (04:57 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3337 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/avr/drv/ser_avr.c
bertos/cpu/avr/drv/ser_avr.h
bertos/drv/ser.h

index c7c36ff77e163e83cde9fd0bc495b3d8309d89e3..23c4b0760d7f6be343da5843a22caa71b2b66503 100644 (file)
@@ -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
 /* 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
index 5f4e8f6a39a1314d33b310ca988f47678c2f4a3f..a5a74b52d738a9beccd241989803c7ef5590fdac 100644 (file)
@@ -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
index fe05b4d5d81aa16c06cb5e9982d4379f194d31ca..ad27f51c4ae0691a6abab09230572f43f28fc896 100644 (file)
@@ -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"
  */