Skip to content

Conversation

@comejv
Copy link
Contributor

@comejv comejv commented Aug 27, 2025

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.

@github-actions github-actions bot added Area: Documentation Improvements or additions to documentation Area: Drivers Drivers issues Size: S The size of the change in this PR is small labels Aug 27, 2025
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@comejv maybe it should better to create a DEPRECATED macro that accept the symbol/function and the due date. Also we could include a test the convert it in an error to alert people to remove that function case the due date has passed

@raiden00pl
Copy link
Member

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.

jerpelea
jerpelea previously approved these changes Sep 1, 2025
@acassis
Copy link
Contributor

acassis commented Sep 3, 2025

@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.

@linguini1
Copy link
Contributor

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

@acassis
Copy link
Contributor

acassis commented Jan 15, 2026

ping @comejv

This commit fixes a typo in the capture.h header file. This is a
breaking change, but the fix is trivial (replace macro with new one).

Signed-off-by: Côme VINCENT <[email protected]>
@comejv
Copy link
Contributor Author

comejv commented Jan 20, 2026

Sorry for the (long) delay, finished the job that had me working with nuttx and then forgot about it.

Tell me if the commit message should reflect that it is a breaking change more.

@comejv comejv requested a review from acassis January 20, 2026 08:43
@comejv
Copy link
Contributor Author

comejv commented Jan 20, 2026

The job Linux (arm64-01) fails with this output:

====================================================================================
Configuration/Tool: qemu-armv8a/rpproxy
2026-01-20 09:18:25

Cleaning...
/github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
/github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
Configuring...
Building NuttX...
cu_main.c: In function 'sigint':
Error: cu_main.c:128:33: error: 'siginfo' undeclared (first use in this function)
128 | FAR struct cu_globals_s *cu = siginfo->si_user;
| ^~~~~~~
cu_main.c:128:33: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/github/workspace/sources/apps/Application.mk:330: cu_main.c.github.workspace.sources.apps.system.cu.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[1]: *** [Makefile:54: /github/workspace/sources/apps/system/cu_all] Error 2
make[1]: Target 'all' not remade because of errors.
make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
[1/1] Normalize qemu-armv8a/rpproxy

Is there something I'm supposed to do about that? At first glance it doesn't look related to my changes.

@xiaoxiang781216
Copy link
Contributor

fixed here: apache/nuttx-apps#3349

@xiaoxiang781216
Copy link
Contributor

@comejv apps side need fix:

cap_main.c: In function 'cap_main':
Error: cap_main.c:354:23: error: 'CAPIOC_FREQUENCE' undeclared (first use in this function); did you mean 'CAPIOC_FREQUENCY'?
  354 |       ret = ioctl(fd, CAPIOC_FREQUENCE,
      |                       ^~~~~~~~~~~~~~~~
      |                       CAPIOC_FREQUENCY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Area: Drivers Drivers issues Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TYPO] drivers/timers/capture: CAPIOC_FREQUENCE is not standard english

7 participants