aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/i2c_lld.h
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-18 11:12:33 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-06-18 11:12:33 +0000
commit350ae0a1a9721b8889b038cf2fce6a88f1c288e3 (patch)
treeb6871336e93e1ca6af46fd72ffe4147efb88770d /os/hal/platforms/STM32/i2c_lld.h
parent9e2d63e9dca04b460e36674dcb681d55f8cea5df (diff)
downloadChibiOS-350ae0a1a9721b8889b038cf2fce6a88f1c288e3.tar.gz
ChibiOS-350ae0a1a9721b8889b038cf2fce6a88f1c288e3.tar.bz2
ChibiOS-350ae0a1a9721b8889b038cf2fce6a88f1c288e3.zip
I2C. API BROKEN! Structure fields renamed in underscore naming style.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3055 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/i2c_lld.h')
-rw-r--r--os/hal/platforms/STM32/i2c_lld.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.h b/os/hal/platforms/STM32/i2c_lld.h
index 00c6410fa..a97e863f6 100644
--- a/os/hal/platforms/STM32/i2c_lld.h
+++ b/os/hal/platforms/STM32/i2c_lld.h
@@ -95,28 +95,28 @@
typedef uint32_t i2cflags_t;
typedef enum {
- opmodeI2C,
- opmodeSMBusDevice,
- opmodeSMBusHost,
-} I2C_opMode_t;
+ OPMODE_I2C = 1,
+ OPMODE_SMBUS_DEVICE = 2,
+ OPMODE_SMBUS_HOST = 3,
+} i2copmode_t;
typedef enum {
- stdDutyCycle,
- fastDutyCycle_2,
- fastDutyCycle_16_9,
-} I2C_DutyCycle_t;
+ STD_DUTY_CYCLE = 1,
+ FAST_DUTY_CYCLE_2 = 2,
+ FAST_DUTY_CYCLE_16_9 = 3,
+} i2cdutycycle_t;
/**
* @brief Driver configuration structure.
*/
typedef struct {
- I2C_opMode_t opMode; /*!< Specifies the I2C mode.*/
- uint32_t ClockSpeed; /*!< Specifies the clock frequency. Must be set to a value lower than 400kHz */
- I2C_DutyCycle_t FastModeDutyCycle;/*!< Specifies the I2C fast mode duty cycle */
- uint8_t OwnAddress7; /*!< Specifies the first device 7-bit own address. */
- uint16_t OwnAddress10; /*!< Specifies the second part of device own address in 10-bit mode. Set to NULL if not used. */
- uint16_t Ack; /*!< Enables or disables the acknowledgement. */
- uint8_t nBitAddress; /*!< Specifies if 7-bit or 10-bit address is acknowledged */
+ i2copmode_t op_mode; /*!< Specifies the I2C mode.*/
+ uint32_t clock_speed; /*!< Specifies the clock frequency. Must be set to a value lower than 400kHz */
+ i2cdutycycle_t duty_cycle; /*!< Specifies the I2C fast mode duty cycle */
+ uint8_t own_addr_7; /*!< Specifies the first device 7-bit own address. */
+ uint16_t own_addr_10; /*!< Specifies the second part of device own address in 10-bit mode. Set to NULL if not used. */
+ uint16_t ack; /*!< Enables or disables the acknowledgement. */
+ uint8_t nbit_own_addr; /*!< Specifies if 7-bit or 10-bit address is acknowledged */
} I2CConfig;
@@ -169,7 +169,7 @@ struct I2CDriver{
uint8_t slave_addr1; // 7-bit address of the slave
uint8_t slave_addr2; // used in 10-bit address mode
- uint8_t nbit_address;
+ uint8_t nbit_addr;
/*********** End of the mandatory fields. **********************************/