64bit-Division vermieden.
authorFlorian Pose <fp@igh-essen.com>
Tue, 21 Mar 2006 14:35:52 +0000
changeset 120 e713e7420c4d
parent 119 b2de89096010
child 121 1cd6f7a47b72
64bit-Division vermieden.
master/master.c
--- a/master/master.c	Tue Mar 21 14:23:23 2006 +0000
+++ b/master/master.c	Tue Mar 21 14:35:52 2006 +0000
@@ -888,7 +888,7 @@
     ec_master_send_commands(master);
 
     t_start = get_cycles(); // Sendezeit nehmen
-    t_timeout = (cycles_t) master->timeout * cpu_khz / 1000;
+    t_timeout = (cycles_t) master->timeout * (cpu_khz / 1000);
 
     while (1)
     {
@@ -1013,7 +1013,7 @@
     ecrt_master_async_send(master);
 
     t_start = get_cycles(); // Sendezeit nehmen
-    t_timeout = (cycles_t) master->timeout * cpu_khz / 1000;
+    t_timeout = (cycles_t) master->timeout * (cpu_khz / 1000);
 
     // Aktiv warten!
     while (1) {