Removed ec_master_prepare().
authorFlorian Pose <fp@igh-essen.com>
Fri, 25 Apr 2008 12:08:11 +0000
changeset 901 5ecf7e5729f9
parent 900 f8b5c6d21705
child 902 ad703091a32b
Removed ec_master_prepare().
TODO
master/master.c
--- a/TODO	Fri Apr 25 12:04:23 2008 +0000
+++ b/TODO	Fri Apr 25 12:08:11 2008 +0000
@@ -40,7 +40,6 @@
 * Separate CoE debugging.
 * Make ecrt_master_slave_config() return no error when slave is not present
   or invalid.
-* Remove ec_master_prepare().
 
 Future issues:
 
--- a/master/master.c	Fri Apr 25 12:04:23 2008 +0000
+++ b/master/master.c	Fri Apr 25 12:08:11 2008 +0000
@@ -1227,36 +1227,6 @@
 
 /*****************************************************************************/
 
-/**
-   Prepares synchronous IO.
-   Queues all domain datagrams and sends them. Then waits a certain time, so
-   that ecrt_master_receive() can be called securely.
-*/
-
-void ec_master_prepare(ec_master_t *master /**< EtherCAT master */)
-{
-    ec_domain_t *domain;
-    cycles_t cycles_start, cycles_end, cycles_timeout;
-
-    // queue datagrams of all domains
-    list_for_each_entry(domain, &master->domains, list)
-        ecrt_domain_queue(domain);
-
-    ecrt_master_send(master);
-
-    cycles_start = get_cycles();
-    cycles_timeout = (cycles_t) EC_IO_TIMEOUT /* us */ * (cpu_khz / 1000);
-
-    // active waiting
-    while (1) {
-        udelay(100);
-        cycles_end = get_cycles();
-        if (cycles_end - cycles_start >= cycles_timeout) break;
-    }
-}
-
-/*****************************************************************************/
-
 /** Detaches the slave configurations from the slaves.
  */
 void ec_master_detach_slave_configs(
@@ -1354,8 +1324,6 @@
 #endif
     ec_master_thread_stop(master);
 
-    ec_master_prepare(master); // prepare asynchronous IO
-
     if (master->debug_level)
         EC_DBG("FSM datagram is %x.\n", (unsigned int) &master->fsm_datagram);