Lines Matching refs:channel
102 uint32_t channel; member
156 .channel = DT_PWMS_CHANNEL_BY_NAME(node_id, name), \
261 .channel = DT_PWMS_CHANNEL_BY_IDX(node_id, idx), \
392 uint32_t channel,
402 typedef int (*pwm_set_cycles_t)(const struct device *dev, uint32_t channel,
411 uint32_t channel, uint64_t *cycles);
419 uint32_t channel, pwm_flags_t flags,
427 typedef int (*pwm_enable_capture_t)(const struct device *dev, uint32_t channel);
434 uint32_t channel);
479 __syscall int pwm_set_cycles(const struct device *dev, uint32_t channel,
484 uint32_t channel, uint32_t period, in z_impl_pwm_set_cycles() argument
494 return api->set_cycles(dev, channel, period, pulse, flags); in z_impl_pwm_set_cycles()
508 __syscall int pwm_get_cycles_per_sec(const struct device *dev, uint32_t channel,
512 uint32_t channel, in z_impl_pwm_get_cycles_per_sec() argument
518 return api->get_cycles_per_sec(dev, channel, cycles); in z_impl_pwm_get_cycles_per_sec()
537 static inline int pwm_set(const struct device *dev, uint32_t channel, in pwm_set() argument
545 err = pwm_get_cycles_per_sec(dev, channel, &cycles_per_sec); in pwm_set()
560 return pwm_set_cycles(dev, channel, (uint32_t)period_cycles, in pwm_set()
586 return pwm_set(spec->dev, spec->channel, period, pulse, spec->flags); in pwm_set_dt()
607 return pwm_set(spec->dev, spec->channel, spec->period, pulse, in pwm_set_pulse_dt()
623 static inline int pwm_cycles_to_usec(const struct device *dev, uint32_t channel, in pwm_cycles_to_usec() argument
630 err = pwm_get_cycles_per_sec(dev, channel, &cycles_per_sec); in pwm_cycles_to_usec()
656 static inline int pwm_cycles_to_nsec(const struct device *dev, uint32_t channel, in pwm_cycles_to_nsec() argument
663 err = pwm_get_cycles_per_sec(dev, channel, &cycles_per_sec); in pwm_cycles_to_nsec()
707 uint32_t channel, pwm_flags_t flags, in pwm_configure_capture() argument
718 return api->configure_capture(dev, channel, flags, cb, in pwm_configure_capture()
741 __syscall int pwm_enable_capture(const struct device *dev, uint32_t channel);
745 uint32_t channel) in z_impl_pwm_enable_capture() argument
754 return api->enable_capture(dev, channel); in z_impl_pwm_enable_capture()
772 __syscall int pwm_disable_capture(const struct device *dev, uint32_t channel);
776 uint32_t channel) in z_impl_pwm_disable_capture() argument
785 return api->disable_capture(dev, channel); in z_impl_pwm_disable_capture()
816 __syscall int pwm_capture_cycles(const struct device *dev, uint32_t channel,
848 static inline int pwm_capture_usec(const struct device *dev, uint32_t channel, in pwm_capture_usec() argument
856 err = pwm_capture_cycles(dev, channel, flags, &period_cycles, in pwm_capture_usec()
862 err = pwm_cycles_to_usec(dev, channel, period_cycles, period); in pwm_capture_usec()
867 err = pwm_cycles_to_usec(dev, channel, pulse_cycles, pulse); in pwm_capture_usec()
903 static inline int pwm_capture_nsec(const struct device *dev, uint32_t channel, in pwm_capture_nsec() argument
911 err = pwm_capture_cycles(dev, channel, flags, &period_cycles, in pwm_capture_nsec()
917 err = pwm_cycles_to_nsec(dev, channel, period_cycles, period); in pwm_capture_nsec()
922 err = pwm_cycles_to_nsec(dev, channel, pulse_cycles, pulse); in pwm_capture_nsec()