defines changed from TARGET_LPC1768 to TARGET_LPC176X to support LPC1769 target
Fork of FastAnalogIn by
Diff: FastAnalogIn.h
- Revision:
- 4:cd84739f7640
- Parent:
- 3:a9b753c25073
- Child:
- 5:55274430c8df
diff -r a9b753c25073 -r cd84739f7640 FastAnalogIn.h --- 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()