FastAnalogIn

Fork of FastAnalogIn by Erik -

Revision:
10:afc3b84dbbd6
Parent:
8:68082fdde730
Child:
11:14744c4ac884
--- a/FastAnalogIn_LPC11UXX.cpp	Sat Jul 12 10:39:37 2014 +0000
+++ b/FastAnalogIn_LPC11UXX.cpp	Tue Nov 04 17:53:25 2014 +0000
@@ -45,7 +45,7 @@
  
     uint32_t clkdiv = div_round_up(SystemCoreClock, MAX_ADC_CLK) - 1;
  
-    LPC_ADC->CR = (0 << 0)      // no channels selected
+    LPC_ADC->CR = (LPC_ADC->CR & 0xFF)      // keep current channels
                 | (clkdiv << 8) // max of 4.5MHz
                 | (1 << 16)     // BURST = 1, hardware controlled
                 | ( 0 << 17 );  // CLKS = 0, we stick to 10 bit mode