pub fn set_threshold0(&self, value: Option<i16>) {
        let pcnt = PCNT::regs();
        let unit = pcnt.unit(NUM);

        if let Some(value) = value {
            unit.conf1()
                .modify(|_, w| unsafe { w.cnt_thres0().bits(value as u16) });
            unit.conf0().modify(|_, w| w.thr_thres0_en().set_bit());
        } else {
            unit.conf0().modify(|_, w| w.thr_thres0_en().clear_bit());
        }
    }
Configures a threshold value to trigger an interrupt.

When the count equals this value a threshold0 interrupt is triggered.
If None is specified, then no interrupt is triggered.
esp-hal/src/pcnt/unit.rs