pub fn clear(&self) {
        let pcnt = PCNT::regs();
        critical_section::with(|_cs| {
            pcnt.ctrl().modify(|_, w| w.cnt_rst_u(NUM as u8).set_bit());
            // TODO: does this need a delay? (liebman / Jan 2 2023)
            pcnt.ctrl()
                .modify(|_, w| w.cnt_rst_u(NUM as u8).clear_bit());
        });
    }
Resets the counter value to zero.
esp-hal/src/pcnt/unit.rs