Skip to content

Instantly share code, notes, and snippets.

@mbolivar
Created January 3, 2020 22:14
Show Gist options
  • Save mbolivar/cd82dd45dd0d2ea153425c9506d61929 to your computer and use it in GitHub Desktop.
Save mbolivar/cd82dd45dd0d2ea153425c9506d61929 to your computer and use it in GitHub Desktop.
diff --git a/doc/zephyr.doxyfile.in b/doc/zephyr.doxyfile.in
index 83f9573f57..6f61408f58 100644
--- a/doc/zephyr.doxyfile.in
+++ b/doc/zephyr.doxyfile.in
@@ -1999,7 +1999,8 @@ PREDEFINED = "CONFIG_SYS_CLOCK_EXISTS=y" \
"__aligned(x)=" \
"__printf_like(x, y)=" \
"__attribute__(x)=" \
- "__syscall="
+ "__syscall=" \
+ "DOXYGEN=y"
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
diff --git a/include/sys/onoff.h b/include/sys/onoff.h
index f89edf580a..9197ec4241 100644
--- a/include/sys/onoff.h
+++ b/include/sys/onoff.h
@@ -363,8 +363,10 @@ static inline void onoff_client_init_spinwait(struct onoff_client *cli)
};
}
-#if CONFIG_POLL
/**
+ * @fn static inline void onoff_client_init_signal(struct onoff_client *cli,
+ * struct k_poll_signal *sigp)
+ *
* @brief Initialize an on-off client to be used for a signal
* operation notification.
*
@@ -378,6 +380,7 @@ static inline void onoff_client_init_spinwait(struct onoff_client *cli)
* value must not be null. The signal must be reset before the client
* object is passed to the on-off service API.
*/
+#ifdef CONFIG_POLL
static inline void onoff_client_init_signal(struct onoff_client *cli,
struct k_poll_signal *sigp)
{
@@ -391,6 +394,11 @@ static inline void onoff_client_init_signal(struct onoff_client *cli,
.flags = ONOFF_CLIENT_NOTIFY_SIGNAL,
};
}
+#elif defined(DOXYGEN)
+static inline void onoff_client_init_signal(struct onoff_client *cli,
+ struct k_poll_signal *sigp)
+{
+}
#endif /* CONFIG_POLL */
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment