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:
- 71:973fac37c5b3
- Parent:
- 69:014d4bbd4e03
--- a/main.cpp Wed May 17 19:33:26 2017 +0000 +++ b/main.cpp Thu May 18 17:51:33 2017 +0000 @@ -26,6 +26,10 @@ extern uint16_t static_output_array0[]; extern uint16_t sampling_status; + +#define PRINT_BUFFER_LENGTH 2000 +uint16_t print_buffer[PRINT_BUFFER_LENGTH] = {0}; + // To set up FIR filtering #define TOTAL_TAPS 16 #define STATE_LENGTH 79 @@ -67,6 +71,7 @@ led_red = 1; int DAC_COUNTER = 0; + int print_buffer_count = 0; //bool is_magnified_sample = true; pre_compute_tables(); @@ -87,7 +92,7 @@ pc.printf("\r\n\r\n\r\n"); pdb_start(); - while(1) + while(print_buffer_count<PRINT_BUFFER_LENGTH) { while(sampling_status == 0) { @@ -116,8 +121,10 @@ for(int i = 0; i < len; i++) { static_output_array0[i] = static_input_array0[i] >> 4; - - + print_buffer[print_buffer_count] = static_input_array0[i]; + print_buffer_count++; + if (print_buffer_count>=PRINT_BUFFER_LENGTH) + break; } @@ -183,5 +190,9 @@ status_1 = 0; } } + for(int i = 0; i<PRINT_BUFFER_LENGTH; i++) + { + printf("%d\n\r",print_buffer[i]); + } }