Publishing for sharing with Harald

Dependencies:   csi059

Revision:
4:1c48c9fa44fc
Parent:
3:3e8c16b6620c
--- a/I2C_hot_read.cpp	Thu Jun 21 22:11:25 2018 +0000
+++ b/I2C_hot_read.cpp	Fri May 22 19:19:45 2020 +0000
@@ -62,7 +62,7 @@
         scl = 0;
         wait_us(delay2);
     }
-    pc.printf("\n\n\n\r\tWaiting at bit position %d ..... Monitor adc_op_clk pin\n\n\r\tPress 'q' to quit hot read : ", i);    
+    pc.printf("\n\n\n\r\tWaiting at bit position %d ..... Monitor DATA1_clk_pin pin\n\n\r\tPress 'q' to quit hot read : ", i);    
     while(temp!='q') {
         temp = pc.getc();
     }
@@ -106,8 +106,13 @@
     flag1 = 0;
     //Read Pointer to the Register that needs to be read
     while (!flag1) {
-        pc.printf("\n\n\r\tEnter Register Address in hex (0 to f): ");
+        pc.printf("\n\n\r\tEnter Register Address in hex (0 to 17): ");
         reg_ptr = get_half_byte(&flag1);
+        if (flag1 == 1) {
+            reg_ptr = reg_ptr << 4;
+            temp = get_half_byte(&flag1);
+            reg_ptr = (reg_ptr | temp);
+        }
         if (flag1==0) pc.printf(" \n\r\t\033[%dm Invalid Chracter!! No worries, let us try again \033[%dm",41,40);
     }
     //Read the bit at which hot read is to be performed