aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/i2c.h
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-30 13:43:42 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-30 13:43:42 +0000
commitf73960c8dcbcc2f4f4b4aba8599a45485038ec82 (patch)
treea0eb72d7c2cd323b10b90e9ef3b7d4d763652bae /os/hal/include/i2c.h
parent73ce7b4fe096f227fbabbe471a283f1b916383fb (diff)
downloadChibiOS-f73960c8dcbcc2f4f4b4aba8599a45485038ec82.tar.gz
ChibiOS-f73960c8dcbcc2f4f4b4aba8599a45485038ec82.tar.bz2
ChibiOS-f73960c8dcbcc2f4f4b4aba8599a45485038ec82.zip
I2C. API changed. Transmit and receive buffers removed from I2CSlaveConfig. Now pointers to that buffers pass in functions arguments.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3099 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/i2c.h')
-rw-r--r--os/hal/include/i2c.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index a024ddd9e..953bd88dd 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -144,10 +144,6 @@ struct I2CSlaveConfig{
* If set to @p NULL then the callback is disabled.
*/
i2cerrorcallback_t id_err_callback;
-
- i2cblock_t *rxbuf; /*!< Pointer to receive buffer. */
- i2cblock_t *txbuf; /*!< Pointer to transmit buffer.*/
-
};
@@ -229,9 +225,11 @@ extern "C" {
void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
void i2cStop(I2CDriver *i2cp);
void i2cMasterTransmit(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
- uint16_t slave_addr, size_t txbytes, size_t rxbytes);
+ uint16_t slave_addr,
+ uint8_t *txbuf, size_t txbytes,
+ uint8_t *rxbuf, size_t rxbytes);
void i2cMasterReceive(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
- uint16_t slave_addr, size_t rxbytes);
+ uint16_t slave_addr, uint8_t *rxbuf, size_t rxbytes);
void i2cMasterStart(I2CDriver *i2cp);
void i2cMasterStop(I2CDriver *i2cp);
void i2cAddFlagsI(I2CDriver *i2cp, i2cflags_t mask);