Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Impedance_Fast_Circuitry by
Diff: main.cpp
- Revision:
- 41:3e0623d81b9a
- Parent:
- 40:bd6d8c35e822
- Child:
- 42:52a92a8d2cc7
diff -r bd6d8c35e822 -r 3e0623d81b9a main.cpp --- a/main.cpp Fri Jan 30 06:16:39 2015 +0000 +++ b/main.cpp Fri Jan 30 06:59:19 2015 +0000 @@ -37,6 +37,8 @@ float currA0 = 0; float currA2 = 0; + + // Declaration of functions void timed_sampling(); @@ -45,7 +47,8 @@ int rotary_count = 0; uint32_t last_AMT20_AB_read = 0; -void ADC0_IRQHandler(void); +DMA dma(sample_array1, sample_array2, angle_array, TOTAL_SAMPLES, &rotary_count); + using namespace std; @@ -57,8 +60,8 @@ pc.baud(230400); pc.printf("Starting\r\n"); - dma_init(TOTAL_SAMPLES); - analog_initialization(A0,pc); + dma.reset(); + adc_init(A0); pc.printf("\r\n\r\n\r\n"); @@ -80,9 +83,9 @@ for(int i = 0; i < 3; i++) pc.printf("Sample[%i]: %x\r\n", i, sample_array1[i]); break; case 'a': - start_adc(); + adc_start(); wait(1); - stop_adc(); + adc_stop(); break; } }