frederic blanc
/
HMA_HelloWord
test
Diff: main.cpp
- Revision:
- 3:7acf6d1a6b1e
- Parent:
- 2:88f866289381
- Child:
- 4:75077e05de3e
diff -r 88f866289381 -r 7acf6d1a6b1e main.cpp --- a/main.cpp Fri May 16 14:05:52 2014 +0000 +++ b/main.cpp Thu Jun 05 14:57:10 2014 +0000 @@ -7,8 +7,8 @@ DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); -AnalogIn adc_hma(p17); - +AnalogIn adc_1(p16); +AnalogIn adc_2(p17); uint16_t T_hma_u16[2][4096]; uint16_t index_hma_write=0; @@ -22,13 +22,14 @@ void flipADC() { led4=1; - T_hma_u16[t_write][index_hma_write++]=adc_hma.read_u16(); //read ADC + T_hma_u16[t_write][index_hma_write++]=adc_1.read_u16(); //read ADC + T_hma_u16[t_write][index_hma_write++]=adc_2.read_u16(); //read ADC //T_hma_u16[t_write][index_hma_write++]=0x00FF; - if(index_hma_write>1000) { + if(index_hma_write>2000) { flag_write_USB=1; t_write=!t_write; //toggel buffer - index_hma_read=--index_hma_write; + index_hma_read=index_hma_write-2; index_hma_write=0; } led4=0;