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
In the PWM module, a few functions must be executed in a specific order before continuing. Specifically, init_pwm must be called and followed by set_config, which itself requires that all configurations are set. After this, functions can be called normally (and set_config can be called with any number of parameters).
This is logical to someone familiar with PWM. However, since failling to do so causes ambiguous error messages that don't point to the cause, more documentation should be provided. In addition to better documentation, we might consider enhancing error messages to be clearer, especially for set_config. For example, when functions (like enable) were called after set_config was not configurated with all parameters, an exception triggered with the message "PWM closed unexpectedly." This is ambiguous and doesn't give any hint as to the source of the error.
The text was updated successfully, but these errors were encountered:
In the PWM module, a few functions must be executed in a specific order before continuing. Specifically,
init_pwm
must be called and followed byset_config
, which itself requires that all configurations are set. After this, functions can be called normally (andset_config
can be called with any number of parameters).This is logical to someone familiar with PWM. However, since failling to do so causes ambiguous error messages that don't point to the cause, more documentation should be provided. In addition to better documentation, we might consider enhancing error messages to be clearer, especially for
set_config
. For example, when functions (likeenable
) were called afterset_config
was not configurated with all parameters, an exception triggered with the message "PWM closed unexpectedly." This is ambiguous and doesn't give any hint as to the source of the error.The text was updated successfully, but these errors were encountered: