equal
deleted
inserted
replaced
382 |
382 |
383 /** State: RX_START. |
383 /** State: RX_START. |
384 * |
384 * |
385 * Starts a new receiving sequence by queueing a datagram that checks the |
385 * Starts a new receiving sequence by queueing a datagram that checks the |
386 * slave's mailbox for a new EoE datagram. |
386 * slave's mailbox for a new EoE datagram. |
|
387 * |
|
388 * \fixme Use both devices. |
387 */ |
389 */ |
388 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
390 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
389 { |
391 { |
390 if (eoe->slave->error_flag || |
392 if (eoe->slave->error_flag || |
391 !eoe->slave->master->main_device.link_state) { |
393 !eoe->slave->master->devices[EC_DEVICE_MAIN].link_state) { |
392 eoe->rx_idle = 1; |
394 eoe->rx_idle = 1; |
393 eoe->tx_idle = 1; |
395 eoe->tx_idle = 1; |
394 return; |
396 return; |
395 } |
397 } |
396 |
398 |
609 |
611 |
610 /** State: TX START. |
612 /** State: TX START. |
611 * |
613 * |
612 * Starts a new transmit sequence. If no data is available, a new receive |
614 * Starts a new transmit sequence. If no data is available, a new receive |
613 * sequence is started instead. |
615 * sequence is started instead. |
|
616 * |
|
617 * \fixme Use both devices. |
614 */ |
618 */ |
615 void ec_eoe_state_tx_start(ec_eoe_t *eoe /**< EoE handler */) |
619 void ec_eoe_state_tx_start(ec_eoe_t *eoe /**< EoE handler */) |
616 { |
620 { |
617 #if EOE_DEBUG_LEVEL >= 2 |
621 #if EOE_DEBUG_LEVEL >= 2 |
618 unsigned int wakeup = 0; |
622 unsigned int wakeup = 0; |
619 #endif |
623 #endif |
620 |
624 |
621 if (eoe->slave->error_flag || |
625 if (eoe->slave->error_flag || |
622 !eoe->slave->master->main_device.link_state) { |
626 !eoe->slave->master->devices[EC_DEVICE_MAIN].link_state) { |
623 eoe->rx_idle = 1; |
627 eoe->rx_idle = 1; |
624 eoe->tx_idle = 1; |
628 eoe->tx_idle = 1; |
625 return; |
629 return; |
626 } |
630 } |
627 |
631 |