Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON_SPI3W
Fork of X_NUCLEO_IKS01A2 by
XNucleoIKS01A2 Class Reference
Class XNucleoIKS01A2 is intended to represent the MEMS Inertial & Environmental Nucleo Expansion Board with the same name. More...
#include <XNucleoIKS01A2.h>
Static Public Member Functions | |
static XNucleoIKS01A2 * | instance (DevI2C *ext_i2c=NULL, PinName int1=IKS01A2_PIN_LSM6DSL_INT1, PinName int2=IKS01A2_PIN_LSM6DSL_INT2) |
Get singleton instance. | |
static XNucleoIKS01A2 * | instance (PinName sda, PinName scl, PinName int1=IKS01A2_PIN_LSM6DSL_INT1, PinName int2=IKS01A2_PIN_LSM6DSL_INT2) |
Get singleton instance. | |
Protected Member Functions | |
XNucleoIKS01A2 (DevI2C *ext_i2c, PinName int1, PinName int2) | |
Constructor. |
Detailed Description
Class XNucleoIKS01A2 is intended to represent the MEMS Inertial & Environmental Nucleo Expansion Board with the same name.
The expansion board is featuring basically four IPs:
- a HTS221 Relative Humidity and Temperature Sensor
- a LSM303AGR 3-Axis Magnetometer and 3D Acceleromenter
- a LPS22HB MEMS Pressure Sensor (and Temperature Sensor)
- and a LSM6DSL 3D Acceleromenter and 3D Gyroscope
The expansion board features also a DIL 24-pin socket which makes it possible to add further MEMS adapters and other sensors (e.g. UV index).
It is intentionally implemented as a singleton because only one X_NUCLEO_IKS01A2 at a time might be deployed in a HW component stack.
In order to get the singleton instance you have to call class method `Instance()`, e.g.:
// Inertial & Environmental expansion board singleton instance static X_NUCLEO_IKS01A2 *<TODO>_expansion_board = X_NUCLEO_IKS01A2::Instance();
Definition at line 81 of file XNucleoIKS01A2.h.
Constructor & Destructor Documentation
XNucleoIKS01A2 | ( | DevI2C * | ext_i2c, |
PinName | int1, | ||
PinName | int2 | ||
) | [protected] |
Constructor.
Definition at line 51 of file XNucleoIKS01A2.cpp.
Member Function Documentation
XNucleoIKS01A2 * instance | ( | DevI2C * | ext_i2c = NULL , |
PinName | int1 = IKS01A2_PIN_LSM6DSL_INT1 , |
||
PinName | int2 = IKS01A2_PIN_LSM6DSL_INT2 |
||
) | [static] |
Get singleton instance.
- Returns:
- a pointer to the initialized singleton instance of class XNucleoIKS01A2. A return value of NULL indicates an out of memory situation.
- Parameters:
-
[in] ext_i2c (optional) pointer to an instance of DevI2C to be used for communication on the expansion board. Defaults to NULL. Taken into account only on the very first call of one of the 'Instance' functions. If not provided a new DevI2C will be created with standard configuration parameters. The used DevI2C object gets saved in instance variable dev_i2c. [in] int1 LSM6DSL INT1 pin. Taken into account only on the very first call of one of the 'Instance' functions. It maps the INT1 pin for LSM6DSL. Defaults to IKS01A2_PIN_LSM6DSL_INT1. [in] int2 LSM6DSL INT1 pin. Taken into account only on the very first call of one of the 'Instance' functions. It maps the INT2 pin for LSM6DSL. Defaults to IKS01A2_PIN_LSM6DSL_INT2.
Definition at line 83 of file XNucleoIKS01A2.cpp.
XNucleoIKS01A2 * instance | ( | PinName | sda, |
PinName | scl, | ||
PinName | int1 = IKS01A2_PIN_LSM6DSL_INT1 , |
||
PinName | int2 = IKS01A2_PIN_LSM6DSL_INT2 |
||
) | [static] |
Get singleton instance.
- Returns:
- a pointer to the initialized singleton instance of class X_NUCLEO_IKS01A1. A return value of NULL indicates an out of memory situation.
- Parameters:
-
[in] sda I2C data line pin. Taken into account only on the very first call of one of the 'Instance' functions. A new DevI2C will be created based on parameters 'sda' and 'scl'. The used DevI2C object gets saved in instance variable dev_i2c. [in] scl I2C clock line pin. Taken into account only on the very first call of one of the 'Instance' functions. A new DevI2C will be created based on parameters 'sda' and 'scl'. The used DevI2C object gets saved in instance variable dev_i2c. [in] int1 LSM6DSL INT1 pin. Taken into account only on the very first call of one of the 'Instance' functions. It maps the INT1 pin for LSM6DSL. Defaults to IKS01A2_PIN_LSM6DSL_INT1. [in] int2 LSM6DSL INT1 pin. Taken into account only on the very first call of one of the 'Instance' functions. It maps the INT2 pin for LSM6DSL. Defaults to IKS01A2_PIN_LSM6DSL_INT2.
Definition at line 114 of file XNucleoIKS01A2.cpp.
Generated on Wed Jul 13 2022 22:58:06 by
