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:
20:169bdc228a7b
Parent:
17:cbdee5f7a2aa
Child:
21:8d0624950dd1
--- a/Components/tsz124/tsz124_class.h	Mon Apr 11 05:50:58 2016 +0000
+++ b/Components/tsz124/tsz124_class.h	Mon Apr 11 07:32:53 2016 +0000
@@ -72,6 +72,7 @@
  *   #include "../Interfaces/Temperature_class.h"                             *
  *----------------------------------------------------------------------------*/
 #include "../Interfaces/Instrumentation_amp_class.h"
+#include "x_nucleo_ika01a1_config.h"
 
 
 /* Classes -------------------------------------------------------------------*/
@@ -135,7 +136,7 @@
 	virtual unsigned int GetVoltage(void)
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
-		AnalogIn   ain(A1);
+		AnalogIn   ain(X_NUCLEO_IKA01A1_PIN_INSTRUMENTATION_AMP);
 		return ((double)ain.read())*805.0*ADC_RANGE_12_BIT/1000.0;
 	}
 
@@ -146,7 +147,7 @@
 	virtual unsigned int GetCurrent(void)
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
-		AnalogIn   ain(A2);
+		AnalogIn   ain(X_NUCLEO_IKA01A1_PIN_CURRENT_SENSING);
 		return ((double)ain.read())*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
 	}