From 822a7effbdc46efc53e71efcee2a88763574dba5 Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 28 Jul 2010 16:29:18 +0000 Subject: [PATCH] Move generic i2c_hw_init prototype to i2c header. git-svn-id: https://src.develer.com/svnoss/bertos/branches/i2c@4086 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/i2c_lpc2.h | 2 -- bertos/cpu/cortex-m3/drv/i2c_lm3s.h | 2 -- bertos/cpu/cortex-m3/drv/i2c_stm32.h | 4 +--- bertos/drv/i2c.h | 5 +++++ 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bertos/cpu/arm/drv/i2c_lpc2.h b/bertos/cpu/arm/drv/i2c_lpc2.h index 4a98354b..ecdad243 100644 --- a/bertos/cpu/arm/drv/i2c_lpc2.h +++ b/bertos/cpu/arm/drv/i2c_lpc2.h @@ -51,6 +51,4 @@ enum I2C_CNT /**< Number of serial ports */ }; -void i2c_hw_init(I2c *i2c, int dev, uint32_t clock); - #endif /* I2C_LPC2_H */ diff --git a/bertos/cpu/cortex-m3/drv/i2c_lm3s.h b/bertos/cpu/cortex-m3/drv/i2c_lm3s.h index 8d08e681..b7d30e16 100644 --- a/bertos/cpu/cortex-m3/drv/i2c_lm3s.h +++ b/bertos/cpu/cortex-m3/drv/i2c_lm3s.h @@ -50,6 +50,4 @@ enum I2C_CNT /**< Number of serial ports */ }; -void i2c_hw_init(I2c *i2c, int dev, uint32_t clock); -void i2c_init_0(void); #endif /* I2C_LM3S_H */ diff --git a/bertos/cpu/cortex-m3/drv/i2c_stm32.h b/bertos/cpu/cortex-m3/drv/i2c_stm32.h index f29c1531..152ab6ed 100644 --- a/bertos/cpu/cortex-m3/drv/i2c_stm32.h +++ b/bertos/cpu/cortex-m3/drv/i2c_stm32.h @@ -50,6 +50,4 @@ enum I2C_CNT /**< Number of serial ports */ }; -void i2c_hw_init(I2c *i2c, int dev, uint32_t clock); - -#endif /* I2C_LPC2_H */ +#endif /* I2C_STM32_H */ diff --git a/bertos/drv/i2c.h b/bertos/drv/i2c.h index 7731cd81..8d44daac 100644 --- a/bertos/drv/i2c.h +++ b/bertos/drv/i2c.h @@ -184,6 +184,11 @@ typedef struct I2c #include CPU_HEADER(i2c) +/* + * Low level i2c init implementation prototype. + */ +void i2c_hw_init(I2c *i2c, int dev, uint32_t clock); + void i2c_swSend(struct I2c *i2c, const void *_buf, size_t count); void i2c_swRecv(struct I2c *i2c, void *_buf, size_t count); -- 2.25.1