-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
docs(ledc.rst):Fixed outdated function signature (ledcWrite) #9680
docs(ledc.rst):Fixed outdated function signature (ledcWrite) #9680
Conversation
…of bool ledcWrite)
👋 Hello leandromattioli, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
@leandromattioli Thanks for your contribution, PR is just waiting CI to pass and we can merge it. |
Description of Change
Small fix in the API documentation. The function
ledcWrite
returns a boolean, not void.The documentation already states that:
"This function will return true if setting duty is successful. If false is returned, error occurs and duty was not set."
I've double checked that in the header file (cores/esp32/esp32-hal-ledc.h). The return value is indeed a boolean.
However, the function signature was inconsistent with this behavior:
void ledcWrite(uint8_t pin, uint32_t duty);
The signature was corrected in this patch:
bool ledcWrite(uint8_t pin, uint32_t duty);