nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

drivers/timers/capture: fix typo in capture.h

Open comejv opened this issue 3 months ago • 3 comments

Summary

This commit fixes a typo in the capture.h header file (fix #16835).

Change: CAPIOC_FREQUENCE -> CAPIOC_FREQUENCY

Added a compiler warning of the deprecation to the capture.h file.

Updated capture driver and documentation.

Impact

Now shows a compiler warning when using the capture driver. Old spelling is aliased to the new spelling. Should be removed in future releases.

Testing

Built config capture on Ubuntu.

comejv avatar Aug 27 '25 16:08 comejv

Why not just correct the typo without any additional warnings and delete the old define? This change will cause a compilation error anyway. This is an example of a breaking change that is trivial to fix and immediately visible when migrating to the new NuttX version. In such cases, complicating the process doesn't help at all and makes no sense to me.

raiden00pl avatar Aug 29 '25 08:08 raiden00pl

@comejv just fix like raiden suggested and fix the typo CAPIOC_FREQUENCE. But I think the idea of creating a macro to define a DEPRECATED feature is interesting for later maintenance and to warn users about APIs that will change.

acassis avatar Sep 03 '25 12:09 acassis

Hey @comejv, if you can update this PR to follow raiden00pl's suggestion it can be merged!

linguini1 avatar Sep 28 '25 00:09 linguini1