IO plocana FRDM K64

Revision:
15:3429cdc6e5f4
Parent:
7:4aa3dac73b66
--- a/SPIprotokol/IOspiConnect.cpp	Sat Apr 24 21:26:03 2021 +0200
+++ b/SPIprotokol/IOspiConnect.cpp	Fri Apr 30 00:06:39 2021 +0200
@@ -5,7 +5,7 @@
 
 #include "Pinovi.h"
 
-
+//static DigitalOut ledZ(LED2,1);  /*test */
 
 static DigitalOut tast(IO_TELEGRAM_TAS_PIN,0);
 
@@ -44,7 +44,7 @@
             else if(byteCount == 4)   // analiza celog predajnog telegrama
             {                                
 
-loguj_telegram( "prijem  = ", c_rx.get_telegram() ); 
+//loguj_telegram( "prijem  = ", c_rx.get_telegram() ); 
 
                     if( c_rx.check_sum() )   // provera ispravnosti
                     {
@@ -62,10 +62,16 @@
                                         spiWriteData = c_tx.get_data();   
                                         tast = 1;
 
-loguj_telegram( "priprema predaje = ", c_tx.get_telegram() ); 
+// ne treba    --  loguj_telegram( "priprema predaje = ", c_tx.get_telegram() ); 
 
                                     }
-                                    else c_rx.do_readGroupCommand( c_rx.get_readCommand() ); 
+                                    else
+                                    {
+                                         //ledZ = !ledZ; 
+                                         do_readGroupCommand( c_rx.get_readCommand() ); 
+                                         loguj_broj(c_rx.get_readCommand());
+loguj_telegram( " grupni telegram = ", c_rx.get_telegram() ); 
+                                    }
                                 } // treba vremenska zastita tastovanja !!!
 
                                 if( c_rx.get_writeCommand() )    // da li ima upis ?
@@ -91,7 +97,7 @@
                     tast = 0; 
 //                    spiWriteData = 0x7;                
                     byteCount = 0;
-    loguj_telegram( "predaja = ", c_tx.get_telegram() );            
+//    loguj_telegram( "predaja = ", c_tx.get_telegram() );            
                 }
             }
         }