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 |
604 |
606 |
605 /** State: TX START. |
607 /** State: TX START. |
606 * |
608 * |
607 * Starts a new transmit sequence. If no data is available, a new receive |
609 * Starts a new transmit sequence. If no data is available, a new receive |
608 * sequence is started instead. |
610 * sequence is started instead. |
|
611 * |
|
612 * \fixme Use both devices. |
609 */ |
613 */ |
610 void ec_eoe_state_tx_start(ec_eoe_t *eoe /**< EoE handler */) |
614 void ec_eoe_state_tx_start(ec_eoe_t *eoe /**< EoE handler */) |
611 { |
615 { |
612 #if EOE_DEBUG_LEVEL >= 2 |
616 #if EOE_DEBUG_LEVEL >= 2 |
613 unsigned int wakeup = 0; |
617 unsigned int wakeup = 0; |
614 #endif |
618 #endif |
615 |
619 |
616 if (eoe->slave->error_flag || |
620 if (eoe->slave->error_flag || |
617 !eoe->slave->master->main_device.link_state) { |
621 !eoe->slave->master->devices[EC_DEVICE_MAIN].link_state) { |
618 eoe->rx_idle = 1; |
622 eoe->rx_idle = 1; |
619 eoe->tx_idle = 1; |
623 eoe->tx_idle = 1; |
620 return; |
624 return; |
621 } |
625 } |
622 |
626 |