Lines Matching refs:val
170 uint32_t val = *ccmr; in stm32_timer_capture_setup_chan() local
171 val &= 0xff << shift; in stm32_timer_capture_setup_chan()
172 val |= TIM_CCMR1_CC1S_0 << shift; in stm32_timer_capture_setup_chan()
173 *ccmr = val; in stm32_timer_capture_setup_chan()
185 val = regs->CCER; in stm32_timer_capture_setup_chan()
186 val &= 0xf << shift; in stm32_timer_capture_setup_chan()
187 val |= config << shift; in stm32_timer_capture_setup_chan()
188 regs->CCER = val; in stm32_timer_capture_setup_chan()
224 static uint64_t stm32_timer_calc_value(stm32_timer_capture_t *tc, uint32_t sr, uint32_t val) { in stm32_timer_calc_value() argument
230 if (sr & TIM_SR_UIF && val < stm32_timer_median_val(tc)) { in stm32_timer_calc_value()
233 return overflow | val; in stm32_timer_calc_value()
241 uint32_t val = stm32_timer_get_ccr(tc, chan); in stm32_timer_capture_chan_irq() local
242 return tc->chan[chan].cb(stm32_timer_calc_value(tc, sr, val)); in stm32_timer_capture_chan_irq()