Example program for EVAL-AD9106 and EVAL-AD9102

Dependencies:   AD910x

Revision:
6:b0e941764bb7
Parent:
4:abab08222795
Child:
7:2ff94dbecc75
--- a/main.cpp	Thu Mar 04 02:50:38 2021 +0000
+++ b/main.cpp	Fri Mar 26 12:22:13 2021 +0000
@@ -87,6 +87,7 @@
     
     while( connected == 1 ){
         print_prompt1();
+        while( pc.readable() == 0 );
         ext_clk = getchar();
         if ( ext_clk == 'y' ){
             en_cvddx = 0;
@@ -97,6 +98,7 @@
         }
         thread_sleep_for(500);
         print_prompt2();
+        while( pc.readable() == 0 );
         amp_out = getchar();
         if ( amp_out == 'y' ){
             shdn_n_lt3472 = 1;
@@ -106,6 +108,7 @@
         }
         print_menu();
         example = getchar();
+        while( pc.readable() == 0 );
         printf("%c\n", example);
         switch (example) {
             case '1':
@@ -137,15 +140,19 @@
                 break;
         }
         print_prompt3();
+        while( pc.readable() == 0 );
         while ( !(stop == 'y') ){
             stop = getchar();
         }
         stop_example();
         print_prompt4();
+        while( pc.readable() == 0 );
         exit = getchar();
         if ( exit == 'y' ){
             connected = 0;
             printf("\nExiting program...\n");
+        }else{
+            stop = 'n';
         }
         
     }