#include <zephyr/device.h>
#include <zephyr/drivers/pwm.h>

#define PWM_PERIOD_NS   20000000
#define PWM_PULSE_WIDTH 1400000

static const struct pwm_dt_spec pwm_led0 =
    PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));

int main(void) {
    if (!pwm_is_ready_dt(&pwm_led0)) {
        return 0;
    }
    pwm_set_dt(&pwm_led0, PWM_PERIOD_NS, PWM_PULSE_WIDTH);
    return 0;
}