From fc9fec46dacff63874b4344c78e910c252b3cdcb Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Mon, 14 Sep 2026 21:11:44 -0300 Subject: [PATCH] analog: add ANIOC_COMP_ENABLE and ANIOC_COMP_DISABLE commands Define standard IOCTL commands to enable and disable analog comparator devices from user-space applications. Assisted-by: Gemini:gemini-2.5-pro Signed-off-by: Daniel P. Carvalho --- include/nuttx/analog/ioctl.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/nuttx/analog/ioctl.h b/include/nuttx/analog/ioctl.h index 9a027a3f2d2..83bcadc2328 100644 --- a/include/nuttx/analog/ioctl.h +++ b/include/nuttx/analog/ioctl.h @@ -86,8 +86,17 @@ * IN: None * OUT: struct dac_info_s * */ +/* COMP */ + +#define ANIOC_COMP_ENABLE _ANIOC(0x000d) /* Enable comparator + * IN: None + * OUT: None */ +#define ANIOC_COMP_DISABLE _ANIOC(0x000e) /* Disable comparator + * IN: None + * OUT: None */ + #define AN_FIRST 0x0001 /* First common command */ -#define AN_NCMDS 12 /* Number of common commands */ +#define AN_NCMDS 14 /* Number of common commands */ /* User defined ioctl commands are also supported. These will be forwarded * by the upper-half driver to the lower-half driver via the ioctl()