From acfc77ad9c0bd4cbeabb4ca72787f7e8103a3033 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Wed, 13 Mar 2013 16:26:26 +0100 Subject: [PATCH] Adding I2C_READ_BIT define --- include/drivers/i2c.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/include/drivers/i2c.h b/include/drivers/i2c.h index 1df0e4e..17e809e 100644 --- a/include/drivers/i2c.h +++ b/include/drivers/i2c.h @@ -29,6 +29,8 @@ #define I2C_CLK_100KHz (100*1000) #define I2C_CLK_400KHz (400*1000) +#define I2C_READ_BIT 0x01 +#define I2C_WRITE_BIT 0x00 enum i2c_conditions { I2C_CONT = 0, @@ -71,6 +73,12 @@ enum i2c_state_machine_states { I2C_DATA_NACK = 0x58, }; + +/***************************************************************************** */ +/* Module identification support for DTPlug and DomoTab */ +/***************************************************************************** */ + +/* Module capabilities */ #define UEXT_MOD_HAS_NONE 0 #define UEXT_MOD_HAS_UART (1 << 0) #define UEXT_MOD_HAS_I2C (1 << 1) @@ -94,14 +102,6 @@ enum i2c_eeprom_type { }; -/***************************************************************************** */ -/* I2C Init */ -/***************************************************************************** */ -void set_i2c_pins(void); -void i2c_on(uint32_t i2c_clk_freq); -void i2c_off(void); -/* Allow system to propagate main clock */ -void i2c_clock_update(void); /***************************************************************************** */ /* Read and Write for system eeprom */ @@ -185,4 +185,17 @@ int i2c_read(const void *cmd_buf, size_t cmd_size, const void* ctrl_buf, void* i int i2c_write(const void *buf, size_t count, const void* ctrl_buf); + + +/***************************************************************************** */ +/* I2C Init */ +/***************************************************************************** */ +void set_i2c_pins(void); +void i2c_on(uint32_t i2c_clk_freq); +void i2c_off(void); +/* Allow system to propagate main clock */ +void i2c_clock_update(void); + + + #endif /* DRIVERS_I2C_H */ -- 2.43.0