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.
Dependents: Check_VL6180XA1_ToF
Fork of X_NUCLEO_6180XA1 by
Diff: Components/VL6180X/vl6180x_class.h
- Revision:
- 15:454710d17358
- Parent:
- 14:0effa0bbf192
- Child:
- 16:0d4776564733
--- a/Components/VL6180X/vl6180x_class.h Mon Oct 19 13:54:17 2015 +0200
+++ b/Components/VL6180X/vl6180x_class.h Tue Oct 20 16:44:28 2015 +0200
@@ -128,15 +128,19 @@
/* turns on the sensor */
void VL6180x_On(void)
{
- if (gpio0) *gpio0=1;
- else if (expgpio0) *expgpio0=1;
+ if(gpio0)
+ *gpio0=1;
+ else if(expgpio0)
+ *expgpio0=1;
}
/* turns off the sensor */
void VL6180x_Off(void)
{
- if (gpio0) *gpio0=0;
- else if (expgpio0) *expgpio0=0;
+ if(gpio0)
+ *gpio0=0;
+ else if(expgpio0)
+ *expgpio0=0;
}
int InitSensor(uint8_t NewAddr);
@@ -171,6 +175,11 @@
int HandleIRQ(OperatingMode operating_mode, MeasureData_t *Data);
+ unsigned Present()
+ {
+ return Device->Present;
+ }
+
/* Wrapper functions */
int WaitDeviceBooted()
{
@@ -525,7 +534,7 @@
status=ReadID();
if(status)
- printf("Failed to read ID device! Device not present!\n"); //FIXME da sistemare la funzione di stampa errore ErrLog da platform.h
+ printf("Failed to read ID device! Device not present!\n\r"); //FIXME da sistemare la funzione di stampa errore ErrLog da platform.h
return status;
}
int StopRangeMeasurement(OperatingMode operating_mode);
