16 LPC_SYSCON->PDRUNCFG &= ~(0x1<<4);
17 LPC_SYSCON->SYSAHBCLKCTRL |= (0x1<<13);
21 LPC_IOCON->R_PIO0_11 |= ( 0x1<<1 );
22 LPC_IOCON->R_PIO0_11 &= ~( (0x1<<3)|(0x1<<4) );
23 LPC_IOCON->R_PIO0_11 &= ~( 0x01<<7 );
26 LPC_IOCON->R_PIO1_0 |= ( 0x1<<1 );
27 LPC_IOCON->R_PIO1_0 &= ~( (0x1<<3)|(0x1<<4) );
28 LPC_IOCON->R_PIO1_0 &= ~( 0x01<<7 );
31 LPC_IOCON->R_PIO1_1 |= ( 0x1<<1 );
32 LPC_IOCON->R_PIO1_1 &= ~( (0x1<<3)|(0x1<<4) );
33 LPC_IOCON->R_PIO1_1 &= ~( 0x01<<7 );
36 LPC_IOCON->R_PIO1_2 |= ( 0x1<<1 );
37 LPC_IOCON->R_PIO1_2 &= ~( (0x1<<3)|(0x1<<4) );
38 LPC_IOCON->R_PIO1_2 &= ~( 0x01<<7 );
41 LPC_IOCON->PIO1_4 |= 0x1;
42 LPC_IOCON->PIO1_4 &= ~( (0x1<<3)|(0x1<<4) );
43 LPC_IOCON->PIO1_4 &= ~( 0x01<<7 );
46 LPC_IOCON->PIO1_10 |= 0x1;
47 LPC_IOCON->PIO1_10 &= ~( (0x1<<3)|(0x1<<4) );
48 LPC_IOCON->PIO1_10 &= ~( 0x01<<7 );
51 LPC_ADC->CR |= ((SystemCoreClock/LPC_SYSCON->SYSAHBCLKDIV)/4000000-1)<<8;
74 LPC_ADC->CR &=0xffffff00;
75 LPC_ADC->CR |= (0x1<<0);
76 LPC_ADC->CR |=0x01000000;
77 while(!(LPC_ADC->DR0 & 0x80000000 ));
78 ad_value[0]=(LPC_ADC->DR0 & 0x0000FFC0)>>6;
79 LPC_ADC->CR &= 0xF8FFFFFF;;
81 LPC_ADC->CR &=0xffffff00;
82 LPC_ADC->CR |= (0x1<<1);
83 LPC_ADC->CR |=0x01000000;
84 while(!(LPC_ADC->DR1 & 0x80000000 ));
85 ad_value[1]=(LPC_ADC->DR1 & 0x0000FFC0)>>6;
86 LPC_ADC->CR &= 0xF8FFFFFF;;
90 LPC_ADC->CR &=0xffffff00;
91 LPC_ADC->CR |= (0x1<<2);
92 LPC_ADC->CR |=0x01000000;
93 while(!(LPC_ADC->DR2 & 0x80000000 ));
94 ad_value[2]=(LPC_ADC->DR2 & 0x0000FFC0)>>6;
95 LPC_ADC->CR &= 0xF8FFFFFF;;
97 LPC_ADC->CR &=0xffffff00;
98 LPC_ADC->CR |= (0x1<<3);
99 LPC_ADC->CR |=0x01000000;
100 while(!(LPC_ADC->DR3 & 0x80000000 ));
101 ad_value[3]=(LPC_ADC->DR3 & 0x0000FFC0)>>6;
102 LPC_ADC->CR &= 0xF8FFFFFF;;
104 LPC_ADC->CR &=0xffffff00;
105 LPC_ADC->CR |= (0x1<<5);
106 LPC_ADC->CR |=0x01000000;
107 while(!(LPC_ADC->DR5 & 0x80000000 ));
108 ad_value[5]=(LPC_ADC->DR5 & 0x0000FFC0)>>6;
109 LPC_ADC->CR &= 0xF8FFFFFF;;
111 LPC_ADC->CR &=0xffffff00;
112 LPC_ADC->CR |= (0x1<<6);
113 LPC_ADC->CR |=0x01000000;
114 while(!(LPC_ADC->DR6 & 0x80000000 ));
115 ad_value[6]=(LPC_ADC->DR6 & 0x0000FFC0)>>6;
116 LPC_ADC->CR &= 0xF8FFFFFF;;
void storeAD2Array(int16_t *ad_value)