Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve ambiguity in PWM module #406

Open
josiah-tesfu opened this issue Dec 5, 2023 · 0 comments
Open

Resolve ambiguity in PWM module #406

josiah-tesfu opened this issue Dec 5, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation priority/P3

Comments

@josiah-tesfu
Copy link

josiah-tesfu commented Dec 5, 2023

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.

@farzadpanahi farzadpanahi added documentation Improvements or additions to documentation priority/P3 labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation priority/P3
Projects
None yet
Development

No branches or pull requests

2 participants