diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-09 19:33:19 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-09 19:33:19 +0000 |
commit | 76bac6bb8704e039a7f9e4b34da7af3bd909c2bd (patch) | |
tree | 05ab8480a368177b595a87197d6a8725d50ebebd /os/hal/include/i2c.h | |
parent | eddd171ec8a54080dbd354f9e90baf60a3436266 (diff) | |
download | ChibiOS-76bac6bb8704e039a7f9e4b34da7af3bd909c2bd.tar.gz ChibiOS-76bac6bb8704e039a7f9e4b34da7af3bd909c2bd.tar.bz2 ChibiOS-76bac6bb8704e039a7f9e4b34da7af3bd909c2bd.zip |
I2C. Added own slave address handling and error callback.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2723 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/i2c.h')
-rw-r--r-- | os/hal/include/i2c.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h index 64816186b..5a85ed5f7 100644 --- a/os/hal/include/i2c.h +++ b/os/hal/include/i2c.h @@ -33,8 +33,21 @@ /*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
-
-
+#define I2CD_NO_ERROR 0
+/** @brief Bus Error.*/
+#define I2CD_BUS_ERROR 0x01
+/** @brief Arbitration Lost (master mode).*/
+#define I2CD_ARBITRATION_LOST 0x02
+/** @brief Acknowledge Failure.*/
+#define I2CD_ACK_FAILURE 0x04
+/** @brief Overrun/Underrun.*/
+#define I2CD_OVERRUN 0x08
+/** @brief PEC Error in reception.*/
+#define I2CD_PEC_ERROR 0x10
+/** @brief Timeout or Tlow Error.*/
+#define I2CD_TIMEOUT 0x20
+/** @brief SMBus Alert.*/
+#define I2CD_SMB_ALERT 0x40
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -125,7 +138,6 @@ extern "C" { void i2cMasterReceive(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
-
void i2cMasterStartI(I2CDriver *i2cp,uint16_t header);
void i2cMasterStopI(I2CDriver *i2cp);
void i2cMasterRestartI(I2CDriver *i2cp);
|