aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-12 15:50:35 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-12 15:50:35 +0000
commitd3e15bccfc41af4e4d3972003ff06b69de2225bc (patch)
tree2270080008d85d1418004576832effd8876537b4 /os
parent7148a664b5c73138a504cd61a1882cfb91ba3b7a (diff)
downloadChibiOS-d3e15bccfc41af4e4d3972003ff06b69de2225bc.tar.gz
ChibiOS-d3e15bccfc41af4e4d3972003ff06b69de2225bc.tar.bz2
ChibiOS-d3e15bccfc41af4e4d3972003ff06b69de2225bc.zip
I2C. Revert const qualifier to the pointer to I2CSlaveConfig.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3310 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/include/i2c.h9
-rw-r--r--os/hal/platforms/STM32/i2c_lld.c2
-rw-r--r--os/hal/platforms/STM32/i2c_lld.h2
-rw-r--r--os/hal/src/i2c.c4
4 files changed, 9 insertions, 8 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index 95bbfa8b4..acf09ec9c 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -105,7 +105,7 @@ typedef enum {
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
* callback
*/
-typedef void (*i2ccallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
+typedef void (*i2ccallback_t)(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg);
/**
@@ -116,7 +116,8 @@ typedef void (*i2ccallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
* callback
*/
-typedef void (*i2cerrorcallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
+typedef void (*i2cerrorcallback_t)(I2CDriver *i2cp,
+ const I2CSlaveConfig *i2cscfg);
/**
@@ -255,11 +256,11 @@ extern "C" {
void i2cObjectInit(I2CDriver *i2cp);
void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
void i2cStop(I2CDriver *i2cp);
- void i2cMasterTransmit(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg,
+ void i2cMasterTransmit(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
uint16_t slave_addr,
uint8_t *txbuf, size_t txbytes,
uint8_t *rxbuf, size_t rxbytes);
- void i2cMasterReceive(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg,
+ void i2cMasterReceive(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
uint16_t slave_addr, uint8_t *rxbuf, size_t rxbytes);
void i2cMasterStart(I2CDriver *i2cp);
void i2cMasterStop(I2CDriver *i2cp);
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c
index 48bdb3e4e..202669f8e 100644
--- a/os/hal/platforms/STM32/i2c_lld.c
+++ b/os/hal/platforms/STM32/i2c_lld.c
@@ -40,7 +40,7 @@
* Note:
* When the STOP, START or PEC bit is set, the software must NOT perform
* any write access to I2C_CR1 before this bit is cleared by hardware.
- * Otherwise there is a risk of setting a second STOP, START or PEC request.
+ * Otherwise there is a risk of setting a second STOP, START or PEC request.
*/
/*===========================================================================*/
diff --git a/os/hal/platforms/STM32/i2c_lld.h b/os/hal/platforms/STM32/i2c_lld.h
index aa11bb543..548b5418e 100644
--- a/os/hal/platforms/STM32/i2c_lld.h
+++ b/os/hal/platforms/STM32/i2c_lld.h
@@ -212,7 +212,7 @@ struct I2CDriver{
/**
* @brief Current slave configuration data.
*/
- I2CSlaveConfig *id_slave_config;
+ const I2CSlaveConfig *id_slave_config;
__IO size_t txbytes; /*!< @brief Number of bytes to be transmitted. */
__IO size_t rxbytes; /*!< @brief Number of bytes to be received. */
diff --git a/os/hal/src/i2c.c b/os/hal/src/i2c.c
index 68735b037..9ce2cc76f 100644
--- a/os/hal/src/i2c.c
+++ b/os/hal/src/i2c.c
@@ -166,7 +166,7 @@ void i2cStop(I2CDriver *i2cp) {
* you want transmit only
*/
void i2cMasterTransmit(I2CDriver *i2cp,
- I2CSlaveConfig *i2cscfg,
+ const I2CSlaveConfig *i2cscfg,
uint16_t slave_addr,
uint8_t *txbuf,
size_t txbytes,
@@ -210,7 +210,7 @@ void i2cMasterTransmit(I2CDriver *i2cp,
* @param[in] rxbuf pointer to receive buffer
*/
void i2cMasterReceive(I2CDriver *i2cp,
- I2CSlaveConfig *i2cscfg,
+ const I2CSlaveConfig *i2cscfg,
uint16_t slave_addr,
uint8_t *rxbuf,
size_t rxbytes){