You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nrfx shim introduced for PWM seems to break the API. While the older pwm_nrf5_sw driver and afaics all other pwm drivers comply to the API documentation of the second parameter in pwm_pin_set_cycles and pwm_pin_set_usec to pass the pin where pwm should be applied, pwm_nrfx actually passes the number of the channel. The actual pin that is mapped to this channel is configured via Kconfig. Therefore users have to fix the call when switching between drivers. I also didn't find documentation for this behavior.
On a side note, the usage of -1 in Kconfig to indicate that a channel is not used is inconsistent with how the rest of Zephyr handles those things. Usually I see a dedicated boolean config to en-/disable functionality.
The text was updated successfully, but these errors were encountered:
The nrfx shim introduced for PWM seems to break the API. While the older pwm_nrf5_sw driver and afaics all other pwm drivers comply to the API documentation of the second parameter in
pwm_pin_set_cycles
andpwm_pin_set_usec
to pass the pin where pwm should be applied, pwm_nrfx actually passes the number of the channel. The actual pin that is mapped to this channel is configured via Kconfig. Therefore users have to fix the call when switching between drivers. I also didn't find documentation for this behavior.On a side note, the usage of -1 in Kconfig to indicate that a channel is not used is inconsistent with how the rest of Zephyr handles those things. Usually I see a dedicated boolean config to en-/disable functionality.
The text was updated successfully, but these errors were encountered: