aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-12 18:26:39 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-12 18:26:39 +0000
commit621d794bf0d2a6456221f1e478de66e48c293063 (patch)
tree5e1d92a9110b4b84218529b5a0d688ff8c468db7 /os/hal/src
parent44960790c58f9055068dbc427384ae8d20048334 (diff)
downloadChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.tar.gz
ChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.tar.bz2
ChibiOS-621d794bf0d2a6456221f1e478de66e48c293063.zip
I2C. Documentation improvements. Dead code clenups.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3153 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/i2c.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/os/hal/src/i2c.c b/os/hal/src/i2c.c
index cd12d42eb..b169fb70d 100644
--- a/os/hal/src/i2c.c
+++ b/os/hal/src/i2c.c
@@ -135,18 +135,23 @@ void i2cStop(I2CDriver *i2cp) {
}
/**
- * @brief Sends data ever the I2C bus.
+ * @brief Sends data via the I2C bus.
+ *
+ * @details Function designed to realize "read-through-write" transfer
+ * paradigm. If you want transmit data without any further read,
+ * than set @b rxbuf field to 0.
*
* @param[in] i2cp pointer to the @p I2CDriver object
* @param[in] i2cscfg pointer to the @p I2C slave config
* @param[in] slave_addr Slave device address. Bits 0-9 contain slave
* device address. Bit 15 must be set to 1 if 10-bit
- * addressing modes used. Otherwise keep it cleared.
+ * addressing mode used. Otherwise keep it cleared.
* Bits 10-14 unused.
- * @param[in] txbytes number of bytes to be transmitted
* @param[in] txbuf pointer to transmit buffer
- * @param[in] rxbytes number of bytes to be received
+ * @param[in] txbytes number of bytes to be transmitted
* @param[in] rxbuf pointer to receive buffer
+ * @param[in] rxbytes number of bytes to be received, set it to 0 if
+ * you want transmit only
*/
void i2cMasterTransmit(I2CDriver *i2cp,
const I2CSlaveConfig *i2cscfg,
@@ -183,9 +188,10 @@ void i2cMasterTransmit(I2CDriver *i2cp,
* @param[in] i2cscfg pointer to the @p I2C slave config
* @param[in] slave_addr Slave device address. Bits 0-9 contain slave
* device address. Bit 15 must be set to 1 if 10-bit
- * addressing modes used. Otherwise keep it cleared.
+ * addressing mode used. Otherwise keep it cleared.
* Bits 10-14 unused.
- * @param[in] txbytes number of bytes to be transmited
+ * @param[in] rxbytes number of bytes to be received
+ * @param[in] rxbuf pointer to receive buffer
*/
void i2cMasterReceive(I2CDriver *i2cp,
const I2CSlaveConfig *i2cscfg,