diff --git a/TODO b/TODO index 3451760784052b8dd2732e949b3c2947e15e0259..936337c71b46b52a083fb92941a25d181307b8da 100644 --- a/TODO +++ b/TODO @@ -40,7 +40,6 @@ Version 1.4.0: * Separate CoE debugging. * Make ecrt_master_slave_config() return no error when slave is not present or invalid. -* Remove ec_master_prepare(). Future issues: diff --git a/master/master.c b/master/master.c index ad0b623f9420a466b003dd0d4ff67dbd3d6234a3..e09046013b0e11447d11c768359658db095498d8 100644 --- a/master/master.c +++ b/master/master.c @@ -1227,36 +1227,6 @@ void ec_master_eoe_run(unsigned long data /**< master pointer */) /*****************************************************************************/ -/** - 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 @@ int ecrt_master_activate(ec_master_t *master) #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);