pub fn set_ctrl_mode(&self, low: CtrlMode, high: CtrlMode) {
        let pcnt = PCNT::regs();
        let conf0 = pcnt.unit(UNIT).conf0();

        conf0.modify(|_, w| {
            w.ch_hctrl_mode(NUM as u8)
                .variant(high)
                .ch_lctrl_mode(NUM as u8)
                .variant(low)
        });
    }
Configures how the channel behaves based on the level of the control
signal.

* `low` - The behaviour of the channel when the control signal is low.
* `high` - The behaviour of the channel when the control signal is high.
esp-hal/src/pcnt/channel.rs