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.

Files at this revision

API Documentation at this revision

Comitter:
hemddabral
Date:
Wed Apr 06 09:07:36 2016 +0000
Parent:
10:70f329e007e6
Child:
12:ac16b9a1cad6
Commit message:
compilation warnings removed

Changed in this revision

Components/tsz124/tsz124_class.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/tsz124/tsz124_class.h	Wed Apr 06 09:05:41 2016 +0000
+++ b/Components/tsz124/tsz124_class.h	Wed Apr 06 09:07:36 2016 +0000
@@ -142,14 +142,14 @@
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
 		AnalogIn   ain(A1);
-		return ain.read()*805.0*ADC_RANGE_12_BIT/1000.0;
+		return ((double)ain.read())*805.0*ADC_RANGE_12_BIT/1000.0;
 	}
 
 	virtual unsigned int GetCurrent(void)
 	{
 		const unsigned int ADC_RANGE_12_BIT = 0xFFF;
 		AnalogIn   ain(A2);
-		return ain.read()*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
+		return ((double)ain.read())*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
 	}