bien spi no se queda pegado

Dependencies:   mbed

Revision:
6:c80ec2cdfb9e
Parent:
5:106def451c41
Child:
7:5677ded8ff2a
diff -r 106def451c41 -r c80ec2cdfb9e tets_pc.cpp
--- a/tets_pc.cpp	Wed Sep 12 07:50:38 2018 +0000
+++ b/tets_pc.cpp	Wed Sep 12 16:15:35 2018 +0000
@@ -30,24 +30,21 @@
 
 void captura_matriz(uint16_t* imprimir){
  int i=0;
- int bl=0;
- while(i <8 ){
+ 
+ while(i <8){
+    int j=0;
+    while(j<=8){
      
-     for (int j= 1; j<=8;j++){  // seleciona la columna a imprimir empezando desde la 1
-          
-          bl= memoria[j-1] & (imprimir[j-1]>>i+1);
-    
-          if(i==7 || bl!=0){
-                    memoria[j-1]= memoria[j-1]|(imprimir[j-1]>>i);   
-                            }
-           
-          sendSPI(j, memoria[j-1]|(imprimir[j-1]>>i)); 
-                         
-                            }    
+     sendSPI(j, memoria[j-1]|(imprimir[j-1]>>i)); 
+     if(i==7){
+         
+         memoria[j-1]= memoria[j-1]|(imprimir[j-1]>>i);
+         
+         }
+     j++;
+     } 
      wait(1.0);
      i++;
-     
-     
      }
  
   }