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:
5:55274430c8df
Parent:
4:cd84739f7640
--- a/FastAnalogIn_LPC408X.cpp	Sun Apr 20 16:23:19 2014 +0000
+++ b/FastAnalogIn_LPC408X.cpp	Mon Apr 21 07:17:39 2014 +0000
@@ -26,10 +26,9 @@
     ADCnumber = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
     if (ADCnumber == (uint32_t)NC)
         error("ADC pin mapping failed");
-    //printf("ADC_ID=%u\n",ADCnumber);
     datareg = (uint32_t*) (&LPC_ADC->DR[ADCnumber]);
 
-    wait_us(1000); // we need either the debug printf above or a wait before we try to initialize the ADC
+    wait_us(1000); // wait for a short while before trying to initialize the ADC afer a reset (needed for those global instantiations just before main)
 
     // ensure power is turned on
     LPC_SC->PCONP |= (1 << 12);