From: asterix Date: Tue, 28 Sep 2010 08:46:53 +0000 (+0000) Subject: Fix definition for lm3s8962. X-Git-Tag: 2.6.0~78 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=440bd56c360f3973e7e17a9b7485ca67af5780d2;p=bertos.git Fix definition for lm3s8962. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4323 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/cortex-m3/drv/i2c_lm3s.h b/bertos/cpu/cortex-m3/drv/i2c_lm3s.h index e6e6035d..5a76f93f 100644 --- a/bertos/cpu/cortex-m3/drv/i2c_lm3s.h +++ b/bertos/cpu/cortex-m3/drv/i2c_lm3s.h @@ -45,9 +45,12 @@ */ enum { +#if CPU_CM3_LM3S1968 I2C0, I2C1, - +#elif CPU_CM3_LM3S8962 + I2C0, +#enif I2C_CNT /**< Number of serial ports */ }; diff --git a/bertos/cpu/cortex-m3/io/lm3s.h b/bertos/cpu/cortex-m3/io/lm3s.h index 018b42ba..9720f175 100644 --- a/bertos/cpu/cortex-m3/io/lm3s.h +++ b/bertos/cpu/cortex-m3/io/lm3s.h @@ -51,24 +51,25 @@ #include "lm3s_i2c.h" #include "lm3s_adc.h" - #if CPU_CM3_LM3S1968 - #define GPIO_I2C0_SCL_PIN BV(2) - #define GPIO_I2C0_SDA_PIN BV(3) + #define GPIO_I2C0_SCL_PIN BV(2) + #define GPIO_I2C0_SDA_PIN BV(3) - #define GPIO_I2C1_SCL_PIN BV(6) - #define GPIO_I2C1_SDA_PIN BV(7) + #define GPIO_I2C1_SCL_PIN BV(6) + #define GPIO_I2C1_SDA_PIN BV(7) +#elif CPU_CM3_LM3S8962 + #define GPIO_I2C0_SCL_PIN BV(2) + #define GPIO_I2C0_SDA_PIN BV(3) #else - #error No i2c pins are defined for select cpu + #error No i2c pins are defined for select cpu #endif - /* Flash memory mapping */ -#if CPU_CM3_LM3S1968 - #define FLASH_SIZE 0x40000 //< 256KiB - #define FLASH_PAGE_SIZE 0x400 //< 1KiB +#if CPU_CM3_LM3S1968 || CPU_CM3_LM3S8962 + #define FLASH_SIZE 0x40000 //< 256KiB + #define FLASH_PAGE_SIZE 0x400 //< 1KiB #else - #error No embedded definition for select cpu + #error No embedded definition for select cpu #endif #endif /* LM3S_H */