diff --git a/master/master.c b/master/master.c index 1dbfb2beca28c243bdc2988d11c365a159eb960c..fbd5cea9a1dbaead22ad68083201107d14a68159 100644 --- a/master/master.c +++ b/master/master.c @@ -888,7 +888,7 @@ void ecrt_master_sync_io(ec_master_t *master) ec_master_send_commands(master); t_start = get_cycles(); // Sendezeit nehmen - t_timeout = master->timeout * cpu_khz / 1000; + t_timeout = (cycles_t) master->timeout * cpu_khz / 1000; while (1) { @@ -1013,7 +1013,7 @@ void ecrt_master_prepare_async_io(ec_master_t *master) ecrt_master_async_send(master); t_start = get_cycles(); // Sendezeit nehmen - t_timeout = master->timeout * cpu_khz / 1000; + t_timeout = (cycles_t) master->timeout * cpu_khz / 1000; // Aktiv warten! while (1) { diff --git a/master/slave.c b/master/slave.c index c4e24489701783056c51445dc6a41c78fc67bf60..734279201e791f6b68afeebbc0aa1f1164d88718 100644 --- a/master/slave.c +++ b/master/slave.c @@ -179,7 +179,7 @@ int ec_slave_sii_read(ec_slave_t *slave, // den Status auslesen, bis das Bit weg ist. start = get_cycles(); - timeout = cpu_khz; // 1ms + timeout = (cycles_t) 100 * cpu_khz; // 100ms while (1) { @@ -248,7 +248,7 @@ int ec_slave_sii_write(ec_slave_t *slave, // den Status auslesen, bis das Bit weg ist. start = get_cycles(); - timeout = cpu_khz; // 1ms + timeout = (cycles_t) 100 * cpu_khz; // 100ms while (1) { @@ -504,7 +504,7 @@ void ec_slave_state_ack(ec_slave_t *slave, } start = get_cycles(); - timeout = cpu_khz; // 1ms + timeout = (cycles_t) 10 * cpu_khz; // 10ms while (1) { @@ -568,7 +568,7 @@ int ec_slave_state_change(ec_slave_t *slave, } start = get_cycles(); - timeout = cpu_khz; // 1ms + timeout = (cycles_t) 10 * cpu_khz; // 10ms while (1) {