src/sync.c
changeset 378 d2abf6c8c27b
parent 370 6fecf36df407
child 443 994c99afb344
equal deleted inserted replaced
377:bea5a1576cbd 378:d2abf6c8c27b
   168 
   168 
   169   UNS8 res;
   169   UNS8 res;
   170   
   170   
   171   MSG_WAR(0x3002, "SYNC received. Proceed. ", 0);
   171   MSG_WAR(0x3002, "SYNC received. Proceed. ", 0);
   172   
   172   
   173   (*d->post_sync)();
   173   (*d->post_sync)(d);
   174 
   174 
   175   /* only operational state allows PDO transmission */
   175   /* only operational state allows PDO transmission */
   176   if(! d->CurrentCommunicationState.csPDO) 
   176   if(! d->CurrentCommunicationState.csPDO) 
   177     return 0;
   177     return 0;
   178 
   178 
   179   res = _sendPDOevent(d, 1 /*isSyncEvent*/ );
   179   res = _sendPDOevent(d, 1 /*isSyncEvent*/ );
   180   
   180   
   181   /*Call user app callback*/
   181   /*Call user app callback*/
   182   (*d->post_TPDO)();
   182   (*d->post_TPDO)(d);
   183   
   183   
   184   return res;
   184   return res;
   185   
   185   
   186 }
   186 }
   187 
   187 
   188 
   188 
   189 void _post_sync(){}
   189 void _post_sync(CO_Data* d){}
   190 void _post_TPDO(){}
   190 void _post_TPDO(CO_Data* d){}