Class similar to AnalogIn that uses burst mode to run continious background conversions so when the input is read, the last value can immediatly be returned.

Fork of FastAnalogIn by Erik -

Obsolete!

Has been already merged with Erik's original repository => take the original!

  • Added support for LPC4088.
  • Fixed linker error (missing definition of static member "channel_usage")
Revision:
4:cd84739f7640
Parent:
3:a9b753c25073
Child:
5:55274430c8df
--- a/FastAnalogIn.h	Sat Mar 08 16:01:36 2014 +0000
+++ b/FastAnalogIn.h	Sun Apr 20 16:23:19 2014 +0000
@@ -7,7 +7,7 @@
 #include "mbed.h"
 #include "pinmap.h"
 
-#if !defined TARGET_LPC1768 && !defined TARGET_KL25Z && !defined TARGET_KL46Z && !defined TARGET_KL05Z
+#if !defined TARGET_LPC1768 && !defined TARGET_KL25Z && !defined TARGET_KL46Z && !defined TARGET_KL05Z && !defined TARGET_LPC408X
     #error "Target not supported"
 #endif
 
@@ -107,7 +107,7 @@
     float read( void )
     {
         unsigned short value = read_u16();
-        return (float)value/65535;
+        return (float)value * (1.0f/65535.0f);
     }
     
     /** An operator shorthand for read()