From 45ba03efa3596dc12989ddc47cdd3c242a1869f2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 1 Jun 2016 09:52:02 -0400 Subject: timer: Move union u32_u16_u from compiler.h to avr/timer.c Signed-off-by: Kevin O'Connor --- src/avr/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/avr/timer.c') diff --git a/src/avr/timer.c b/src/avr/timer.c index 0b248552..8cc3d550 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -69,7 +69,10 @@ static uint32_t timer_last; static __always_inline uint32_t calc_time(uint32_t last, uint16_t cur) { - union u32_u16_u calc; + union u32_u16_u { + struct { uint16_t lo, hi; }; + uint32_t val; + } calc; calc.val = last; if (cur < calc.lo) calc.hi++; -- cgit v1.2.3-70-g09d2