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: X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A1 by
Diff: x_nucleo_iks01a1.cpp
- Revision:
- 10:cdf47a4b3f2f
- Parent:
- 8:d49db2c9d9c1
- Child:
- 15:472cf58b9c11
--- a/x_nucleo_iks01a1.cpp Mon Apr 20 11:42:38 2015 +0200
+++ b/x_nucleo_iks01a1.cpp Wed Apr 29 16:14:03 2015 +0200
@@ -73,7 +73,9 @@
if(_instance == NULL) {
if(ext_i2c == NULL)
ext_i2c = new DevI2C(IKS01A1_PIN_I2C_SDA, IKS01A1_PIN_I2C_SCL);
- _instance = new X_NUCLEO_IKS01A1(ext_i2c);
+
+ if(ext_i2c != NULL)
+ _instance = new X_NUCLEO_IKS01A1(ext_i2c);
if(_instance != NULL) {
bool ret = _instance->Init();
