From 05dd87406cd48e83227a53a6ccaa24476e22c27a Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sat, 30 May 2015 10:16:26 +0100 Subject: [PATCH] Small reformat of long lines New screen format.. Signed-off-by: Michel Pollet --- simavr/sim/sim_time.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/simavr/sim/sim_time.h b/simavr/sim/sim_time.h index fd17174..4b81f43 100644 --- a/simavr/sim/sim_time.h +++ b/simavr/sim/sim_time.h @@ -30,25 +30,29 @@ extern "C" { #include "sim_avr.h" // converts a number of usec to a number of machine cycles, at current speed -static inline avr_cycle_count_t avr_usec_to_cycles(struct avr_t * avr, uint32_t usec) +static inline avr_cycle_count_t +avr_usec_to_cycles(struct avr_t * avr, uint32_t usec) { return avr->frequency * (avr_cycle_count_t)usec / 1000000; } // converts back a number of cycles to usecs (for usleep) -static inline uint32_t avr_cycles_to_usec(struct avr_t * avr, avr_cycle_count_t cycles) +static inline uint32_t +avr_cycles_to_usec(struct avr_t * avr, avr_cycle_count_t cycles) { return 1000000L * cycles / avr->frequency; } // converts back a number of cycles to nsecs -static inline uint64_t avr_cycles_to_nsec(struct avr_t * avr, avr_cycle_count_t cycles) +static inline uint64_t +avr_cycles_to_nsec(struct avr_t * avr, avr_cycle_count_t cycles) { return (uint64_t)1E6 * (uint64_t)cycles / (avr->frequency/1000); } // converts a number of hz (to megahertz etc) to a number of cycle -static inline avr_cycle_count_t avr_hz_to_cycles(avr_t * avr, uint32_t hz) +static inline avr_cycle_count_t +avr_hz_to_cycles(avr_t * avr, uint32_t hz) { return avr->frequency / hz; } -- 2.39.5