Lines Matching full:pwm
11 #include <zephyr/drivers/pwm.h>
26 Pwm *regs;
52 Pwm * const pwm = config->regs; in sam_pwm_set_cycles() local
75 if (pwm->PWM_CH_NUM[channel].PWM_CMR != cmr) { in sam_pwm_set_cycles()
76 pwm->PWM_DIS = 1 << channel; in sam_pwm_set_cycles()
78 pwm->PWM_CH_NUM[channel].PWM_CMR = cmr; in sam_pwm_set_cycles()
79 pwm->PWM_CH_NUM[channel].PWM_CPRD = period_cycles; in sam_pwm_set_cycles()
80 pwm->PWM_CH_NUM[channel].PWM_CDTY = pulse_cycles; in sam_pwm_set_cycles()
83 * change is triggered at the next PWM period. in sam_pwm_set_cycles()
85 pwm->PWM_CH_NUM[channel].PWM_CPRDUPD = period_cycles; in sam_pwm_set_cycles()
86 pwm->PWM_CH_NUM[channel].PWM_CDTYUPD = pulse_cycles; in sam_pwm_set_cycles()
90 pwm->PWM_ENA = 1 << channel; in sam_pwm_set_cycles()
99 Pwm * const pwm = config->regs; in sam_pwm_init() local
106 /* Enable PWM clock in PMC */ in sam_pwm_init()
116 pwm->PWM_CLK = PWM_CLK_PREA(prescaler) | PWM_CLK_DIVA(divider); in sam_pwm_init()
121 static DEVICE_API(pwm, sam_pwm_driver_api) = {
129 .regs = (Pwm *)DT_INST_REG_ADDR(inst), \