diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-23 19:06:33 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-23 19:06:33 +0000 |
commit | b1d043cede9e37dccff9731978887f51a514c387 (patch) | |
tree | 4590e365a81e4bb98fc938b47003758e1d15f4c2 /os/hal/platforms/STM32 | |
parent | 97e643a2a2086bf8d52c77d599748849ff6a8148 (diff) | |
download | ChibiOS-b1d043cede9e37dccff9731978887f51a514c387.tar.gz ChibiOS-b1d043cede9e37dccff9731978887f51a514c387.tar.bz2 ChibiOS-b1d043cede9e37dccff9731978887f51a514c387.zip |
I2C. Some coding style improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3074 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r-- | os/hal/platforms/STM32/i2c_lld.c | 4 | ||||
-rw-r--r-- | os/hal/platforms/STM32/i2c_lld.h | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c index 6f2f26714..1dc58e8e6 100644 --- a/os/hal/platforms/STM32/i2c_lld.c +++ b/os/hal/platforms/STM32/i2c_lld.c @@ -42,8 +42,8 @@ static uint32_t i2c_get_event(I2CDriver *i2cp){ } static void i2c_serve_event_interrupt(I2CDriver *i2cp) { -#define txBuffp (i2cp->txBuffp) -#define rxBuffp (i2cp->rxBuffp) +#define txBuffp (i2cp->txbuff_p) +#define rxBuffp (i2cp->rxbuff_p) I2C_TypeDef *dp = i2cp->id_i2c; diff --git a/os/hal/platforms/STM32/i2c_lld.h b/os/hal/platforms/STM32/i2c_lld.h index d0c1415c4..51c975c37 100644 --- a/os/hal/platforms/STM32/i2c_lld.h +++ b/os/hal/platforms/STM32/i2c_lld.h @@ -165,8 +165,8 @@ struct I2CDriver{ size_t txbytes; /*!< Number of bytes to be transmitted. */ size_t rxbytes; /*!< Number of bytes to be received. */ - uint8_t *rxBuffp; /*!< Pointer to the current byte in slave rx buffer. */ - uint8_t *txBuffp; /*!< Pointer to the current byte in slave tx 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. */ i2cflags_t errors; /*!< Error flags.*/ i2cflags_t flags; /*!< State flags.*/ @@ -227,8 +227,10 @@ void i2c_lld_set_opmode(I2CDriver *i2cp); 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); -void i2c_lld_master_receive(I2CDriver *i2cp, uint16_t slave_addr, size_t rxbytes); +void i2c_lld_master_transmit(I2CDriver *i2cp, uint16_t slave_addr, + size_t txbytes, size_t rxbytes); +void i2c_lld_master_receive(I2CDriver *i2cp, uint16_t slave_addr, + size_t rxbytes); #ifdef __cplusplus } |