aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/i2c_lld.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/platforms/STM32/i2c_lld.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/platforms/STM32/i2c_lld.h')
-rw-r--r--os/hal/platforms/STM32/i2c_lld.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.h b/os/hal/platforms/STM32/i2c_lld.h
index d9cd40915..f1f065359 100644
--- a/os/hal/platforms/STM32/i2c_lld.h
+++ b/os/hal/platforms/STM32/i2c_lld.h
@@ -165,6 +165,8 @@ struct I2CDriver{
size_t txbytes; /*!< Number of bytes to be transmitted. */
size_t rxbytes; /*!< Number of bytes to be received. */
+ uint8_t *rxbuf; /*!< Pointer to receive buffer. */
+ uint8_t *txbuf; /*!< Pointer to transmit buffer.*/
uint8_t *rxbuff_p; /*!< Pointer to the current byte in slave rx buffer. */
uint8_t *txbuff_p; /*!< Pointer to the current byte in slave tx buffer. */
@@ -228,9 +230,9 @@ void i2c_lld_set_own_address(I2CDriver *i2cp);
void i2c_lld_start(I2CDriver *i2cp);
void i2c_lld_stop(I2CDriver *i2cp);
void i2c_lld_master_transmit(I2CDriver *i2cp, uint16_t slave_addr,
- size_t txbytes, size_t rxbytes);
+ uint8_t *txbuf, size_t txbytes, uint8_t *rxbuf, size_t rxbytes);
void i2c_lld_master_receive(I2CDriver *i2cp, uint16_t slave_addr,
- size_t rxbytes);
+ uint8_t *rxbuf, size_t rxbytes);
#ifdef __cplusplus
}