equal
deleted
inserted
replaced
321 { |
321 { |
322 if (!eoe->opened) |
322 if (!eoe->opened) |
323 return; |
323 return; |
324 |
324 |
325 // if the datagram was not sent, or is not yet received, skip this cycle |
325 // if the datagram was not sent, or is not yet received, skip this cycle |
326 if (eoe->queue_datagram || eoe->datagram.state == EC_DATAGRAM_SENT) |
326 if (eoe->queue_datagram || |
|
327 eoe->datagram.state == EC_DATAGRAM_SENT || eoe->datagram.state == EC_DATAGRAM_QUEUED) |
327 return; |
328 return; |
328 |
329 |
329 // call state function |
330 // call state function |
330 eoe->state(eoe); |
331 eoe->state(eoe); |
331 |
332 |
346 /** Queues the datagram, if necessary. |
347 /** Queues the datagram, if necessary. |
347 */ |
348 */ |
348 void ec_eoe_queue(ec_eoe_t *eoe /**< EoE handler */) |
349 void ec_eoe_queue(ec_eoe_t *eoe /**< EoE handler */) |
349 { |
350 { |
350 if (eoe->queue_datagram) { |
351 if (eoe->queue_datagram) { |
351 ec_master_queue_datagram_ext(eoe->slave->master, &eoe->datagram); |
352 ec_master_queue_fsm_datagram(eoe->slave->master, &eoe->datagram); |
352 eoe->queue_datagram = 0; |
353 eoe->queue_datagram = 0; |
353 } |
354 } |
354 } |
355 } |
355 |
356 |
356 /*****************************************************************************/ |
357 /*****************************************************************************/ |