Update latest
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Revision 3:a35a16f3da39, committed 2017-10-02
- Comitter:
- mapellil
- Date:
- Mon Oct 02 09:28:58 2017 +0200
- Parent:
- 2:b3212ad3c306
- Child:
- 4:00493226e59f
- Commit message:
- Added SPI3/3Wires sensor support, some API modifcations
Changed in this revision
lis3mdl_class.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/lis3mdl_class.h Wed Sep 27 16:49:10 2017 +0200 +++ b/lis3mdl_class.h Mon Oct 02 09:28:58 2017 +0200 @@ -43,16 +43,22 @@ #include "DevI2C.h" #include "lis3mdl.h" #include "MagneticSensor.h" +#include <assert.h> /* Classes -------------------------------------------------------------------*/ /** Class representing a LIS3MDL sensor component */ class LIS3MDL : public MagneticSensor { public: + enum SPI_type_t {SPI3W, SPI4W}; +// LIS3MDL(SPI *spi, PinName cs_pin, PinName int_pin=NC, SPI_type_t spi_type=SPI4W); +// LIS3MDL(DevI2C *i2c, uint8_t address=LPS22HB_ADDRESS_HIGH, PinName int_pin=NC); + /** 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) { + LIS3MDL(DevI2C *i2c) : dev_i2c(i2c) { } /** Destructor