diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-18 13:35:26 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-18 13:35:26 +0000 |
commit | f3e571839bd7649073664d1c2c4ea3842695b6d5 (patch) | |
tree | 0397ef728add30dec186fdce9b33676c0ceab4e9 /os/hal/include | |
parent | 350ae0a1a9721b8889b038cf2fce6a88f1c288e3 (diff) | |
download | ChibiOS-f3e571839bd7649073664d1c2c4ea3842695b6d5.tar.gz ChibiOS-f3e571839bd7649073664d1c2c4ea3842695b6d5.tar.bz2 ChibiOS-f3e571839bd7649073664d1c2c4ea3842695b6d5.zip |
I2C. Code cleanups.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3056 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r-- | os/hal/include/i2c.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h index 6b8661c7e..cc551887d 100644 --- a/os/hal/include/i2c.h +++ b/os/hal/include/i2c.h @@ -96,11 +96,7 @@ typedef enum { /**
* @brief I2C notification callback type.
* @details This callback invoked when byte transfer finish event occurs,
- * No matter sending or reading. This function designed
- * for sending (re)start or stop events to I2C bus from user level.
- *
- * If callback function is set to NULL - driver atomaticcaly
- * generate stop condition after the transfer finish.
+ * No matter sending or reading.
*
* @param[in] i2cp pointer to the @p I2CDriver object triggering the
* callback
@@ -135,8 +131,7 @@ typedef uint8_t i2cblock_t; struct I2CSlaveConfig{
/**
* @brief Callback pointer.
- * @note Transfer finished callback. Invoke when all data transferred, or
- * by DMA buffer events
+ * @note Transfer finished callback. Invoke when all data transferred.
* If set to @p NULL then the callback is disabled.
*/
i2ccallback_t id_callback;
@@ -154,8 +149,8 @@ struct I2CSlaveConfig{ 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).*/
- i2cflags_t errors;
- i2cflags_t flags;
+ i2cflags_t errors; /*!< Error flags.*/
+ i2cflags_t flags; /*!< State flags.*/
/* Status Change @p EventSource.*/
EventSource sevent;
};
@@ -212,7 +207,7 @@ struct I2CSlaveConfig{ * - Callback invocation.
* - Waiting thread wakeup, if any.
* - Driver state transitions.
- * .
+ *
* @note This macro is meant to be used in the low level drivers
* implementation only.
*
@@ -236,7 +231,7 @@ extern "C" { #endif
void i2cInit(void);
void i2cObjectInit(I2CDriver *i2cp);
- void i2cStart(I2CDriver *i2cp, I2CConfig *config);
+ void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
void i2cStop(I2CDriver *i2cp);
void i2cMasterTransmit(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
void i2cMasterReceive(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
|