FreeRTOS/FreeRTOS-Kernel

[BUG] Inconsistent parameter name

swaldhoer opened this issue ยท 12 comments

Describe the bug
In FreeRTOS version V10.5.0 a parameter in function MPU_vTimerSetReloadMode was changed from UBaseType_t uxAutoReload to BaseType_t xAutoReload :

FreeRTOS-Kernel/History.txt

Lines 414 to 417 in 7215c89

+ Changed uxAutoReload parameter in timer functions to xAutoReload. The
type is now BaseType_t. This matches the type of pdTRUE and pdFALSE.
The new function xTimerGetAutoReload() provides the auto-reload state as
a BaseType_t. The legacy function uxTimerGetAutoReload is retained with the

But there are still old namings used which not all compilers and coding standards are happy about.

Target

  • Development board: n. a.
  • Instruction Set Architecture: n. a.
  • IDE and version: n. a.
  • Toolchain and version: n. a.

Host

  • Host OS: n. a.
  • Version: n. a.

To Reproduce
See https://github.com/search?q=repo%3AFreeRTOS%2FFreeRTOS-Kernel%20uxAutoReload%20&type=code

Expected behavior
Parameter name is in all declarations and definitions xAutoReload.

Hey, this does seem like a bug.

Feel free to open a PR if you would like, else we can do so.

Went ahead and made the fix - #1166

Hi @swaldhoer
The PR #1166 has been approved and merged. Does it fix the issue you reported?

Closing since the issue is fixed.

Thanks for the search! I see I forgot at least a couple which need to be fixed.

Yes, but for the remaining uxAutoReload it's not just about the name, but also the type.

Agreed! I'm going to revert my commit, figure out how we got the mismatched types across the mpu wrapper v1 and v2, and then will come up with a fix commit.

The type mismatches were straightforward so I've created a PR to apply the type mismatch fix - #1181

All problems should be fixed now - let me know if you still find any other issues.

Thanks, will have a look, when updating to the latest version, but I think it should be good!

Small question: The changelog has not been updated on purpose? Is it only updated on new releases or how does it work?

I took a look at the history.txt log but it only seems to document changes between releases. We will mention this fix between as part of our next release.