mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Revision:
14:8277ca0ab13a
Parent:
13:9cecc8d66cc1
Child:
16:2f9443aedbe8
diff -r 9cecc8d66cc1 -r 8277ca0ab13a Components/tsv734/tsv734_class.h
--- a/Components/tsv734/tsv734_class.h	Thu Apr 07 07:51:13 2016 +0000
+++ b/Components/tsv734/tsv734_class.h	Fri Apr 08 05:30:21 2016 +0000
@@ -88,16 +88,9 @@
 	/**
 	 * @brief Constructor.
 	 */
-	TSV734(void) : Led_driver()
+	TSV734(PinName ledDriverPin) : Led_driver()
 	{
-		/* ACTION 4 ----------------------------------------------------------*
-		 * Initialize here the component's member variables, one variable per *
-		 * line.                                                              *
-		 *                                                                    *
-		 * Example:                                                           *
-		 *   measure = 0;                                                     *
-		 *   instance_id = number_of_instances++;                             *
-		 *--------------------------------------------------------------------*/
+		led_driver_pin = ledDriverPin;
 	}
 	
 	/**
@@ -132,11 +125,10 @@
  	 * @param  Configure the TSV734 operational amplifier in LED driver configuration
 	 * @retval 0 
 	 */		
-	virtual int Configure(PinName pinName, unsigned int period_us)
-	{
-		pwmPinName = pinName;
-		PwmOut ledOut(pwmPinName);
+	virtual int Configure(unsigned int period_us)
+	{		
 		period = period_us;
+		PwmOut ledOut(led_driver_pin);
 		ledOut.period_ms(period);
 		return 0;
 	}	
@@ -148,7 +140,7 @@
 	 */	
 	virtual int SetDutyCycle(float dc)
 	{
-		PwmOut ledOut(pwmPinName);
+		PwmOut ledOut(led_driver_pin);
 		ledOut.pulsewidth_us((period*dc)/100);
 		return (int) dc;
 	}
@@ -214,7 +206,8 @@
 	Status_t TSV734_ConfigIT(void* a);
 	Status_t TSV734_SetDutyCycle(float dutyCycle);
 	unsigned int period;
-	PinName pwmPinName;
+	PinName	led_driver_pin;
+
 
 
 	/*** Component's I/O Methods ***/