Beta
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A2 by
Diff: Components/LSM6DSLSensor/LSM6DSLSensor.h
- Revision:
- 9:038121268b07
- Parent:
- 6:671fd10a51b7
--- a/Components/LSM6DSLSensor/LSM6DSLSensor.h Tue Mar 14 13:56:20 2017 +0100 +++ b/Components/LSM6DSLSensor/LSM6DSLSensor.h Tue Mar 14 13:30:55 2017 +0000 @@ -133,8 +133,8 @@ virtual int get_g_axes(int32_t *pData); virtual int get_x_sensitivity(float *pfData); virtual int get_g_sensitivity(float *pfData); - virtual int get_x_axesRaw(int16_t *pData); - virtual int get_g_axesRaw(int16_t *pData); + virtual int get_x_axes_raw(int16_t *pData); + virtual int get_g_axes_raw(int16_t *pData); virtual int get_x_odr(float *odr); virtual int get_g_odr(float *odr); virtual int set_x_odr(float odr); @@ -187,7 +187,7 @@ */ void attach_int1_irq(void (*fptr)(void)) { - INT1_irq.rise(fptr); + _int1_irq.rise(fptr); } /** @@ -197,7 +197,7 @@ */ void enable_int1_irq(void) { - INT1_irq.enable_irq(); + _int1_irq.enable_irq(); } /** @@ -207,7 +207,7 @@ */ void disable_int1_irq(void) { - INT1_irq.disable_irq(); + _int1_irq.disable_irq(); } /** @@ -217,7 +217,7 @@ */ void attach_int2_irq(void (*fptr)(void)) { - INT2_irq.rise(fptr); + _int2_irq.rise(fptr); } /** @@ -227,7 +227,7 @@ */ void enable_int2_irq(void) { - INT2_irq.enable_irq(); + _int2_irq.enable_irq(); } /** @@ -237,7 +237,7 @@ */ void disable_int2_irq(void) { - INT2_irq.disable_irq(); + _int2_irq.disable_irq(); } /** @@ -249,7 +249,7 @@ */ uint8_t io_read(uint8_t* pBuffer, uint8_t RegisterAddr, uint16_t NumByteToRead) { - return (uint8_t) dev_i2c.i2c_read(pBuffer, address, RegisterAddr, NumByteToRead); + return (uint8_t) _dev_i2c.i2c_read(pBuffer, _address, RegisterAddr, NumByteToRead); } /** @@ -261,7 +261,7 @@ */ uint8_t io_write(uint8_t* pBuffer, uint8_t RegisterAddr, uint16_t NumByteToWrite) { - return (uint8_t) dev_i2c.i2c_write(pBuffer, address, RegisterAddr, NumByteToWrite); + return (uint8_t) _dev_i2c.i2c_write(pBuffer, _address, RegisterAddr, NumByteToWrite); } private: @@ -271,18 +271,18 @@ int set_g_odr_when_disabled(float odr); /* Helper classes. */ - DevI2C &dev_i2c; + DevI2C &_dev_i2c; - InterruptIn INT1_irq; - InterruptIn INT2_irq; + InterruptIn _int1_irq; + InterruptIn _int2_irq; /* Configuration */ - uint8_t address; + uint8_t _address; - uint8_t X_isEnabled; - float X_Last_ODR; - uint8_t G_isEnabled; - float G_Last_ODR; + uint8_t _x_is_enabled; + float _x_last_odr; + uint8_t _g_is_enabled; + float _g_last_odr; }; #ifdef __cplusplus