Now you can use NC as InterruptIn

Dependencies:   X_NUCLEO_COMMON

Fork of X_NUCLEO_6180XA1 by ST

Revision:
7:2dc81120c917
Parent:
4:a5abf7757947
Child:
10:4954b09b72d8
--- a/x_nucleo_6180xa1.h	Fri Sep 18 13:19:50 2015 +0000
+++ b/x_nucleo_6180xa1.h	Fri Sep 25 12:12:51 2015 +0200
@@ -54,26 +54,37 @@
 	protected:
 	
 	public:
-		X_NUCLEO_VL6180XA1(); // verificare se necessario passare come argomento un dev_i2c
-		bool VL6180X_Init(); // controlla la presenza del sensore , chiamo Prepare() e setto ready
-		// modificare l'indirizzo i2c dei sensori (slave address)
+		X_NUCLEO_VL6180XA1(DevI2C *i2c)): dev_i2c(i2c), 
+			  vl6180x_top(new VL6180X()),
+			  vl6180x_left(new VL6180X()),
+			  vl6180x_bottom(new VL6180X()),
+			  vl6180x_right(new VL6180X()),
+			  display(new Display(i2c)),
+			  gpio_expander(i2c));			  
 		
 			
-		VL6180X *vl6180x_sensor;
+		VL6180X *vl6180x_top;
+		VL6180X *vl6180x_left;
+		VL6180X *vl6180x_bottom;
+		VL6180X *vl6180x_right;
 		Display *display;
 		GPIO_expander *gpio_expander;
 		DevI2C *dev_i2c;
 		
-		//posso creare 4 puntatori a istanze di tipo VL6180X, con i nomi della board(S1, left, bottom, right)
-		//oppure posso creare un vettore di VL6180X di dimensione 4 per contenere tutti i sensori
-		//dopo tengo traccia di quali sensori sono presenti e funzionanti 
+		X_NUCLEO_VL6180XA1 *Instance(DevI2C *i2c)
+		{
+			 if(_instance==NULL)
+			 	  _instance=new X_NUCLEO_6180XA1(i2c);
+			 else
+			    errore
+		}
 		
 	private:
-		static X_NUCLEO_IKS01A1 *instance;
+		static X_NUCLEO_6180XA1 *_instance;
 		
 }
 */
 
 
 
-#endif /* __X_NUCLEO_6180XA1_H */
\ No newline at end of file
+#endif /* __X_NUCLEO_6180XA1_H */