From: asterix Date: Fri, 30 Jul 2010 16:09:10 +0000 (+0000) Subject: Update hw files. X-Git-Tag: 2.6.0~275 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=fe0574946861850880407c1be53f3b12c61cbb04;p=bertos.git Update hw files. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4115 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/boards/arduino/hw/hw_i2c_bitbang.h b/boards/arduino/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/arduino/hw/hw_i2c_bitbang.h +++ b/boards/arduino/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/at91sam7s-ek/hw/hw_i2c_bitbang.h b/boards/at91sam7s-ek/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/at91sam7s-ek/hw/hw_i2c_bitbang.h +++ b/boards/at91sam7s-ek/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/at91sam7x-ek/hw/hw_i2c_bitbang.h b/boards/at91sam7x-ek/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/at91sam7x-ek/hw/hw_i2c_bitbang.h +++ b/boards/at91sam7x-ek/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/ek-lm3s1968/hw/hw_i2c_bitbang.h b/boards/ek-lm3s1968/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/ek-lm3s1968/hw/hw_i2c_bitbang.h +++ b/boards/ek-lm3s1968/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/lpc-p2378/hw/hw_i2c_bitbang.h b/boards/lpc-p2378/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/lpc-p2378/hw/hw_i2c_bitbang.h +++ b/boards/lpc-p2378/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/stm32-p103/hw/hw_i2c_bitbang.h b/boards/stm32-p103/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/stm32-p103/hw/hw_i2c_bitbang.h +++ b/boards/stm32-p103/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */ diff --git a/boards/triface/hw/hw_i2c_bitbang.h b/boards/triface/hw/hw_i2c_bitbang.h index 8f3fbf5e..6aabb46d 100644 --- a/boards/triface/hw/hw_i2c_bitbang.h +++ b/boards/triface/hw/hw_i2c_bitbang.h @@ -62,4 +62,66 @@ */ #define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +/* + * New api + */ +#include + +INLINE void i2c_sdaHi(int dev) +{ + (void)(dev); + /* Implement me:Set SDA High by setting SDA pin as input */ +} + +INLINE void i2c_sdaLo(int dev) +{ + (void)(dev); + /* Implement me:Set SDA Low by setting SDA pin as open collector output */ +} + +INLINE void i2c_sclHi(int dev) +{ + (void)(dev); + /* Implement me:Set SCL High by setting SCL pin as input */ +} + +INLINE void i2c_sclLo(int dev) +{ + (void)(dev); + /* Implement me:Set SCL Low by setting SCL pin as open collector output */ +} + +INLINE bool i2c_sdaIn(int dev) +{ + (void)(dev); + /* Implement me: read SDA pin state */ + return true; +} + +INLINE bool i2c_sclIn(int dev) +{ + (void)(dev); + /* Implement me: read SCL pin state */ + return true; +} + +/** + * Half bit delay routine used to generate the correct timings. + */ +INLINE void i2c_halfbitDelay(int dev) +{ + (void)(dev); + /* Implement me! */ +} + +/** + * This macro should set SDA and SCL lines as input. + */ +INLINE void i2c_bitbangInit(int dev) +{ + (void)(dev); + /* Implement me! */ +} + #endif /* HW_I2C_BITBANG_H */