From 4ced1453cee7a3131459040efd57f73bfc77aece Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 15 Jun 2020 14:02:42 +0100 Subject: guage code --- app/tacho.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/tacho.c') diff --git a/app/tacho.c b/app/tacho.c index 87f398f..bf0222c 100644 --- a/app/tacho.c +++ b/app/tacho.c @@ -1,6 +1,6 @@ #include "project.h" -#define SPURIOUS MS(10) /*Anything faster than 6000rpm is a false trigger */ +#define SPURIOUS MS(10) /*Anything faster than 6000rpm is a false trigger */ @@ -20,12 +20,12 @@ TACHO_ISR (void) uint32_t now, diff; static uint32_t last_edge; - if (!(EXTI_PR & TACHO)) + if (! (EXTI_PR & TACHO)) return; EXTI_PR = TACHO; - now = dwt_read_cycle_counter (); + now = dwt_read_cycle_counter(); diff = cycle_diff (last_edge, now); @@ -35,12 +35,12 @@ TACHO_ISR (void) last_edge = now; -/* Want RPM, diff is in units of 1/72 us */ + /* Want RPM, diff is in units of 1/72 us */ if (!diff) return; -/* uint32_t is un-able to express 60s in clock ticks, so divide everything by 2 */ + /* uint32_t is un-able to express 60s in clock ticks, so divide everything by 2 */ diff >>= 1; -- cgit v1.2.3