From 0c2fbb1d194e6bdaf45a81945d5d4cee9cad1c07 Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Wed, 3 Jan 2024 17:24:37 -0800 Subject: [PATCH] updated to use 66 ticks or counter overflows at 4.8Mhz; at 6.8ms per overflow so aproximatly 450ms long press time. --- main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 238b6f0..4c7be5f 100644 --- a/main.c +++ b/main.c @@ -75,7 +75,8 @@ * * Ticks are used as our way of keep track of long button presses. * */ -#define LONG_PRESS_TICKS 60 +//original sent had 60 +#define LONG_PRESS_TICKS 66 /*A structure to hold the button info*/ @@ -381,9 +382,8 @@ static inline void init_timer0() { TCCR0B = 0x00; //zero timer /*set prescaler*/ - //TCCR0B |= (1<