From: Michel Pollet Date: Sat, 30 May 2015 09:16:26 +0000 (+0100) Subject: Small reformat of long lines X-Git-Tag: v1.6~78 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=df49c4044949ebff93a6f5c0b1a8be9abfb3d35b;p=sx%2Fsimavr.git Small reformat of long lines New screen format.. Signed-off-by: Michel Pollet --- 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; }