From f73960c8dcbcc2f4f4b4aba8599a45485038ec82 Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 30 Jun 2011 13:43:42 +0000 Subject: 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 --- os/hal/include/i2c.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'os/hal/include') 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); -- cgit v1.2.3