RTEMS | bsp/aarch64/raspberrypi4: Add PWM peripheral support (!509)
Shaunak Datar (@skdatar)
gitlab at rtems.org
Mon Jun 16 18:21:59 UTC 2025
Shaunak Datar commented on a discussion on bsps/aarch64/raspberrypi/pwm/raspberrypi-pwm.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/509#note_124726
> +}
> +
> +static rtems_status_code rpi_pwm_set_range(
> + raspberrypi_pwm_master master,
> + raspberrypi_pwm_channel channel,
> + uint32_t range
> +)
> +{
> + if ( master != raspberrypi_pwm_master0 &&
> + master != raspberrypi_pwm_master1 ) {
> + return RTEMS_INVALID_NUMBER;
> + }
> +
> + if ( channel != raspberrypi_pwm0 && channel != raspberrypi_pwm1 ) {
> + return RTEMS_INVALID_NUMBER;
> + }
Yeah- the static functions which are called through the init function do not need an extra check. So putting the validation logic in the init function and in the non-static functions is enough.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/509#note_124726
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250616/21218dfd/attachment-0001.htm>
More information about the bugs
mailing list