Update latest
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Revision 2:b3212ad3c306, committed 2017-09-27
- Comitter:
- mapellil
- Date:
- Wed Sep 27 16:49:10 2017 +0200
- Parent:
- 1:d85092ab306e
- Child:
- 3:a35a16f3da39
- Commit message:
- Fixed NonCopyable
Changed in this revision
| lis3mdl_class.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/lis3mdl_class.h Thu Sep 07 12:27:45 2017 +0000
+++ b/lis3mdl_class.h Wed Sep 27 16:49:10 2017 +0200
@@ -52,7 +52,7 @@
/** Constructor
* @param[in] i2c device I2C to be used for communication
*/
- LIS3MDL(DevI2C &i2c) : MagneticSensor(), dev_i2c(i2c) {
+ LIS3MDL(DevI2C *i2c) : MagneticSensor(), dev_i2c(i2c) {
}
/** Destructor
@@ -111,7 +111,7 @@
MAGNETO_StatusTypeDef LIS3MDL_IO_Read(uint8_t* pBuffer,
uint8_t RegisterAddr, uint16_t NumByteToRead)
{
- int ret = dev_i2c.i2c_read(pBuffer,
+ int ret = dev_i2c->i2c_read(pBuffer,
LIS3MDL_M_MEMS_ADDRESS,
RegisterAddr,
NumByteToRead);
@@ -132,7 +132,7 @@
MAGNETO_StatusTypeDef LIS3MDL_IO_Write(uint8_t* pBuffer,
uint8_t RegisterAddr, uint16_t NumByteToWrite)
{
- int ret = dev_i2c.i2c_write(pBuffer,
+ int ret = dev_i2c->i2c_write(pBuffer,
LIS3MDL_M_MEMS_ADDRESS,
RegisterAddr,
NumByteToWrite);
@@ -144,7 +144,7 @@
/*** Instance Variables ***/
/* IO Device */
- DevI2C &dev_i2c;
+ DevI2C *dev_i2c;
};
#endif // __LIS3MDL_CLASS_H
Daniel Lee