From: Robin Krens Date: Thu, 19 May 2022 15:07:02 +0000 (+0200) Subject: hbc: only use comp0a X-Git-Url: https://robinkrens.nl/gitweb/?p=lra-as-sensor;a=commitdiff_plain;h=be4ee52ea901f7bd7786ffea9010d3e473754a67 hbc: only use comp0a --- diff --git a/hbc.c b/hbc.c index 5ff04c7..6080410 100644 --- a/hbc.c +++ b/hbc.c @@ -18,16 +18,6 @@ ISR(TIM0_COMPA_vect) { xvar++; } -ISR(TIM0_COMPB_vect) -{ - xvar++; -} - -ISR(TIM0_OVF_vect) -{ - //xvar++; -} - static void switch_idle(void) { @@ -56,7 +46,7 @@ int main(void) TCCR0B |= (1 << CS02) | (1 << CS00); /* clk/1024 prescaler */ OCR0A = 0x7F; /* 50% duty cycle */ TCNT0 = 0; - TIMSK = (1 << OCIE0A) | (1 << OCIE0B) | (1 << TOIE0); /* enable interrupts for overflow and compare */ + TIMSK = (1 << OCIE0A); /* enable interrupts for overflow and compare */ sei(); while(1) {