From 59fa66e164ffaa0431035435a397aadbc988fb2a Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Thu, 19 May 2022 17:33:12 +0200 Subject: [PATCH] reduce ISR time from 4.5us to 1.6us --- spule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spule.c b/spule.c index 98d1ab1..b2a8432 100644 --- a/spule.c +++ b/spule.c @@ -91,7 +91,8 @@ void do_spule(){ } ISR(TIMER1_OVF_vect) { - if(ioHelperReadBit(outStates, MOTOR_TRANS_DIR)){ + //if(ioHelperReadBit(outStates, MOTOR_TRANS_DIR)){ + if(PORTB & (1<<6)){ spule_trans_pos -= 1; } else{