drivers/timers/capture: fix typo in capture.h
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.
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.
@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.
Hey @comejv, if you can update this PR to follow raiden00pl's suggestion it can be merged!