Updates to follow mbed SDK coding style guidelines.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Dependents: 53L0A1_Satellites_with_Interrupts_OS5 Display_53L0A1_OS5
Fork of X_NUCLEO_53L0A1 by
Diff: x_nucleo_53l0a1.cpp
- Revision:
- 16:98ce55ddbb1a
- Parent:
- 15:932d8b4e52c9
--- a/x_nucleo_53l0a1.cpp Tue Jun 20 16:00:31 2017 +0000 +++ b/x_nucleo_53l0a1.cpp Thu Jun 22 09:55:10 2017 +0000 @@ -38,11 +38,12 @@ /* Includes ------------------------------------------------------------------*/ #include "x_nucleo_53l0a1.h" +#include "vl53l0x_platform_log.h" /* Static variables ----------------------------------------------------------*/ X_NUCLEO_53L0A1* X_NUCLEO_53L0A1::_instance = NULL; -X_NUCLEO_53L0A1* X_NUCLEO_53L0A1::Instance(DevI2C *ext_i2c) +X_NUCLEO_53L0A1* X_NUCLEO_53L0A1::instance(DevI2C *ext_i2c) { if(_instance==NULL) _instance=new X_NUCLEO_53L0A1(ext_i2c); @@ -51,7 +52,7 @@ return _instance; } -X_NUCLEO_53L0A1* X_NUCLEO_53L0A1::Instance(DevI2C *ext_i2c, +X_NUCLEO_53L0A1* X_NUCLEO_53L0A1::instance(DevI2C *ext_i2c, PinName gpio1_centre, PinName gpio1_left, PinName gpio1_right) { @@ -63,14 +64,14 @@ } -int X_NUCLEO_53L0A1::InitBoard() +int X_NUCLEO_53L0A1::init_board() { int status, n_dev=0; - sensor_centre->VL53L0X_Off(); - sensor_left->VL53L0X_Off(); - sensor_right->VL53L0X_Off(); - status=sensor_centre->InitSensor(NEW_SENSOR_CENTRE_ADDRESS); + sensor_centre->vl53l0x_off(); + sensor_left->vl53l0x_off(); + sensor_right->vl53l0x_off(); + status=sensor_centre->init_sensor(NEW_SENSOR_CENTRE_ADDRESS); if(status) { delete sensor_centre; delete xshutdown_centre; @@ -81,7 +82,7 @@ printf("Sensor centre present\n\r"); n_dev++; } - status=sensor_left->InitSensor(NEW_SENSOR_LEFT_ADDRESS); + status=sensor_left->init_sensor(NEW_SENSOR_LEFT_ADDRESS); if(status) { delete sensor_left; delete xshutdown_left; @@ -93,7 +94,7 @@ n_dev++; } - status=sensor_right->InitSensor(NEW_SENSOR_RIGHT_ADDRESS); + status=sensor_right->init_sensor(NEW_SENSOR_RIGHT_ADDRESS); if(status) { delete sensor_right; delete xshutdown_right;