Fixed STMPE1600 writeSYS_CTRL, enabled multi sensors support
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_53L0A1 by
Diff: x_nucleo_53l0a1.h
- Revision:
- 9:992abcfb7ef5
- Parent:
- 7:35ecf3e060c3
diff -r 35ecf3e060c3 -r 992abcfb7ef5 x_nucleo_53l0a1.h --- a/x_nucleo_53l0a1.h Mon Dec 05 11:50:38 2016 +0000 +++ b/x_nucleo_53l0a1.h Mon Mar 27 12:37:57 2017 +0000 @@ -47,8 +47,8 @@ #include "DevI2C.h" /** New device addresses */ -//#define NEW_SENSOR_CENTRE_ADDRESS 0x54 -#define NEW_SENSOR_CENTRE_ADDRESS 0x52 +#define NEW_SENSOR_CENTRE_ADDRESS 0x54 +//#define NEW_SENSOR_CENTRE_ADDRESS 0x52 #define NEW_SENSOR_LEFT_ADDRESS 0x56 #define NEW_SENSOR_RIGHT_ADDRESS 0x58 @@ -66,10 +66,8 @@ X_NUCLEO_53L0A1(DevI2C *ext_i2c) : dev_i2c(ext_i2c) { stmpe1600_exp0 = new STMPE1600(*ext_i2c, (0x43 * 2)); // U21 - stmpe1600_exp0->writeSYS_CTRL (SOFT_RESET); stmpe1600_exp1 = new STMPE1600(*ext_i2c, (0x42 * 2)); // U19 - stmpe1600_exp1->writeSYS_CTRL (SOFT_RESET); display = new Display(*stmpe1600_exp0, *stmpe1600_exp1); @@ -93,10 +91,8 @@ X_NUCLEO_53L0A1(DevI2C *ext_i2c, PinName gpio1_centre, PinName gpio1_left, PinName gpio1_right) : dev_i2c(ext_i2c) { stmpe1600_exp0 = new STMPE1600(*ext_i2c, (0x43 * 2)); // U21 - stmpe1600_exp0->writeSYS_CTRL(SOFT_RESET); stmpe1600_exp1 = new STMPE1600(*ext_i2c, (0x42 * 2)); // U19 - stmpe1600_exp1->writeSYS_CTRL(SOFT_RESET); display = new Display(*stmpe1600_exp0, *stmpe1600_exp1);