EtherCAT slave that reads 3 Xsens IMU's connected to a Xbus Master

Dependencies:   MODSERIAL mbed KL25Z_ClockControl

Fork of EtherCAT by First Last

Revision:
22:3f3a9f55054c
Parent:
21:6150ca891301
Child:
23:2b2cdba08259
--- a/soes.cpp	Fri Mar 06 09:16:18 2015 +0000
+++ b/soes.cpp	Fri Mar 06 09:19:38 2015 +0000
@@ -71,8 +71,8 @@
 xbus_t xbus_master;
 //MODSERIAL pc(USBTX,USBRX);
 
-//DigitalOut ploep(PTA13);
-//#define PLOEP do{ploep = !(ploep);}while(0);
+DigitalOut ploep(PTA13);
+#define PLOEP do{ploep = !(ploep);}while(0);
 
 /* Private function prototypes -----------------------------------------------*/
 /* Private functions ---------------------------------------------------------*/
@@ -214,6 +214,7 @@
     {
         while(xbus_serial.readable())
         {
+        	PLOEP;
         	XbusReceiveState(&xbus_master, xbus_serial.getc());
         	if(xbus_master.rx.checksum_ok)
         	{
@@ -223,7 +224,6 @@
         			//pc.printf("%u , %u\n", Rb.first.acc[0] , *((uint16_t *)(&xbus_master.rx.buffer[6])) );
         		}
         		xbus_master.rx.checksum_ok = 0;
-        		//PLOEP;
         	}
     	}
         ESC_read(ESCREG_LOCALTIME, &ESCvar.Time, sizeof(ESCvar.Time), &ESCvar.ALevent);