Library I2C pins modification to fit nucleo 32 pins modules
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Dependents: STM32_MagneticLight
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();