pub fn with_prescaler(prescaler: u8) -> Self {
        let clocks = Clocks::get();
        cfg_if::cfg_if! {
            if #[cfg(esp32)] {
                let source_clock = clocks.pwm_clock;
            } else if #[cfg(esp32c6)] {
                let source_clock = clocks.crypto_clock;
            } else if #[cfg(esp32s3)] {
                let source_clock = clocks.crypto_pwm_clock;
            } else if #[cfg(esp32h2)] {
                let source_clock = clocks.xtal_clock;
            }
        }

        Self {
            frequency: source_clock / (prescaler as u32 + 1),
            prescaler,
        }
    }
Get a clock configuration with the given prescaler.

With standard system clock configurations the input clock to the MCPWM
peripheral is `160 MHz`.

The peripheral clock frequency is calculated as:
`peripheral_clock = input_clock / (prescaler + 1)`
esp-hal/src/mcpwm/mod.rs