aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-18 14:31:27 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-18 14:31:27 +0000
commit79f477ba95384ef082a7f2ec71e228e02e62e864 (patch)
tree14e183910332e525df1033a56f39155029662033 /os/hal/include
parentf3e571839bd7649073664d1c2c4ea3842695b6d5 (diff)
downloadChibiOS-79f477ba95384ef082a7f2ec71e228e02e62e864.tar.gz
ChibiOS-79f477ba95384ef082a7f2ec71e228e02e62e864.tar.bz2
ChibiOS-79f477ba95384ef082a7f2ec71e228e02e62e864.zip
I2C. "Slave_addr" and "nbit_addr" fields from I2CSlaveConfig structure merged together.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3057 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/i2c.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index cc551887d..b59644588 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -147,8 +147,16 @@ struct I2CSlaveConfig{
size_t rxbytes; /*!< Number of bytes to received. */
i2cblock_t *rxbuf; /*!< Pointer to receive buffer. */
i2cblock_t *txbuf; /*!< Pointer to transmit buffer.*/
- uint16_t slave_addr; /*!< Slave device address.*/
- uint8_t nbit_addr; /*!< Length of address (must be 7 or 10).*/
+ /**
+ * @brief Slave device address.
+ * @details Bits 0-9 contain slave device address.
+ *
+ * Bit 15 must be set to 1 if 10-bit addressing modes used. Otherwise
+ * keep it cleared.
+ *
+ * Bits 10-14 unused.
+ */
+ uint16_t slave_addr;
i2cflags_t errors; /*!< Error flags.*/
i2cflags_t flags; /*!< State flags.*/
/* Status Change @p EventSource.*/