cleanup pwm_input.h

This commit is contained in:
Allen Ibara
2009-07-22 01:00:32 +00:00
parent 1e2333c300
commit ecc069d5c5
+2 -3
View File
@@ -15,18 +15,17 @@ static inline void pwm_input_isr()
{
static uint32_t t_rise;
static uint32_t t_fall;
uint32_t t_event = T0CR3;
if (T0CCR & TCCR_CR3_F) {
t_fall = T0CR3;
T0CCR &= ~TCCR_CR3_F;
T0CCR |= TCCR_CR3_R;
T0CCR &= ~TCCR_CR3_F;
pwm_input_duration = t_fall - t_rise;
pwm_input_valid = TRUE;
} else {
t_rise = T0CR3;
T0CCR &= ~TCCR_CR3_R;
T0CCR |= TCCR_CR3_F;
T0CCR &= ~TCCR_CR3_R;
}
}