From 0894b6aac56636fa596c30aab303524d869364ad Mon Sep 17 00:00:00 2001 From: Jonathan Wyss Date: Wed, 6 Mar 2024 12:28:34 +0100 Subject: [PATCH] attiny45 --- main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index 9c20380..05fc130 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,7 @@ #include #define PATTERN_COUNT 4 - +#define attiny45 typedef struct { unsigned char r; @@ -17,10 +17,7 @@ volatile int counts; -ISR(TIMER0_OVF_vect) -{ - count(); -} + void count(void) { //counts=0;//0..65535 @@ -39,7 +36,10 @@ void count(void) } } - +ISR(TIMER0_OVF_vect) +{ + count(); +} @@ -67,7 +67,7 @@ int main (void) { // (2) DDRB = (1 << PB0 )|(1<