diff --git a/src/xrt/auxiliary/CMakeLists.txt b/src/xrt/auxiliary/CMakeLists.txt index 8ba74c58945a6c7dd3d1c973f522331a13677d41..36acf157c3fe120a8c034b98f2cc758d45c816ae 100644 --- a/src/xrt/auxiliary/CMakeLists.txt +++ b/src/xrt/auxiliary/CMakeLists.txt @@ -16,6 +16,7 @@ set(SOURCE_FILES util/u_debug.h util/u_device.c util/u_device.h + util/u_documentation.h util/u_time.cpp util/u_time.h ) diff --git a/src/xrt/auxiliary/util/u_debug.c b/src/xrt/auxiliary/util/u_debug.c index 96805e96453d22cafbb6a0bcdf41c126961388dc..42f140c45a2030b30616df6c4fa36b2fd2c0a45d 100644 --- a/src/xrt/auxiliary/util/u_debug.c +++ b/src/xrt/auxiliary/util/u_debug.c @@ -4,6 +4,7 @@ * @file * @brief Small debug helpers. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util * * Debug get option helpers heavily inspired from mesa ones. */ diff --git a/src/xrt/auxiliary/util/u_debug.h b/src/xrt/auxiliary/util/u_debug.h index e9dd7c2d3cd7d2c387fca2f9d3a43a27a272f5cc..dc093caa9be198a0724e16ff8f276c9ad10324af 100644 --- a/src/xrt/auxiliary/util/u_debug.h +++ b/src/xrt/auxiliary/util/u_debug.h @@ -4,6 +4,7 @@ * @file * @brief Small debug helpers. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util * * Debug get option helpers heavily inspired from mesa ones. */ diff --git a/src/xrt/auxiliary/util/u_device.c b/src/xrt/auxiliary/util/u_device.c index ed4274d5c8566ea7ef944b07925ae1f3bcc66ba6..34fda8989d7025756b3238e2d5c534a8333f7ef5 100644 --- a/src/xrt/auxiliary/util/u_device.c +++ b/src/xrt/auxiliary/util/u_device.c @@ -4,6 +4,7 @@ * @file * @brief Misc helpers for device drivers. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util */ #include <math.h> diff --git a/src/xrt/auxiliary/util/u_device.h b/src/xrt/auxiliary/util/u_device.h index 645092604b8f7ec01a9eeed7d43b4c510f04c25f..b111eec9860f294c6aebaa3a0cb03d869d787af1 100644 --- a/src/xrt/auxiliary/util/u_device.h +++ b/src/xrt/auxiliary/util/u_device.h @@ -4,6 +4,7 @@ * @file * @brief Misc helpers for device drivers. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util */ #pragma once @@ -23,6 +24,8 @@ extern const struct xrt_matrix_2x2 u_device_rotation_180; /*! * Dump the device config to stderr. + * + * @ingroup aux_util */ void u_device_dump_config(struct xrt_device* xdev, diff --git a/src/xrt/auxiliary/util/u_documentation.h b/src/xrt/auxiliary/util/u_documentation.h new file mode 100644 index 0000000000000000000000000000000000000000..4116065ab7495653b56d617834e3e4cd9fd3e523 --- /dev/null +++ b/src/xrt/auxiliary/util/u_documentation.h @@ -0,0 +1,40 @@ +// Copyright 2019, Collabora, Ltd. +// SPDX-License-Identifier: BSL-1.0 +/*! + * @file + * @brief Header with just documentation. + * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util + */ + +#pragma once + + +/*! + * @defgroup aux Auxiliary + * @ingroup xrt + * + * @brief Shared code and helpers for Monado. + */ + +/*! + * @defgroup aux_util Utilities + * @ingroup aux + * + * @brief Smaller pieces of auxiliary utilities code. + */ + + +/*! + * @dir auxiliary + * @ingroup aux + * + * @brief Shared code and helpers for Monado. + */ + +/*! + * @dir auxiliary/util + * @ingroup aux + * + * @brief Smaller pieces of auxiliary utilities code. + */ diff --git a/src/xrt/auxiliary/util/u_misc.c b/src/xrt/auxiliary/util/u_misc.c index 72bdd15d7f0b3e6a701b1b46fe92692769c1752e..06a68c326d97e0aca69465ae1b3625346426cc2a 100644 --- a/src/xrt/auxiliary/util/u_misc.c +++ b/src/xrt/auxiliary/util/u_misc.c @@ -4,6 +4,7 @@ * @file * @brief Very small misc utils. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util */ #include "util/u_misc.h" diff --git a/src/xrt/auxiliary/util/u_misc.h b/src/xrt/auxiliary/util/u_misc.h index 709018e644fac4a270a9f886a3ec0d637d0d5958..fb0bea1ab2d8419b5f700c43718db7259180f472 100644 --- a/src/xrt/auxiliary/util/u_misc.h +++ b/src/xrt/auxiliary/util/u_misc.h @@ -4,6 +4,7 @@ * @file * @brief Very small misc utils. * @author Jakob Bornecrantz <jakob@collabora.com> + * @ingroup aux_util */ #pragma once @@ -17,12 +18,16 @@ extern "C" { /*! * Allocate and zero the space required for some type, and cast the return type * appropriately. + * + * @ingroup aux_util */ #define U_TYPED_CALLOC(TYPE) ((TYPE *)calloc(1, sizeof(TYPE))) /*! * Allocate and zero the space required for some type, and cast the return type * appropriately. + * + * @ingroup aux_util */ #define U_TYPED_ARRAY_CALLOC(TYPE, COUNT) \ ((TYPE *)calloc((COUNT), sizeof(TYPE))) diff --git a/src/xrt/auxiliary/util/u_time.cpp b/src/xrt/auxiliary/util/u_time.cpp index 64e580cd6aa2aa18299ed0de8e43147ad6b40880..0d717e6ca8e9413ed5ca79c9d017108b714927f7 100644 --- a/src/xrt/auxiliary/util/u_time.cpp +++ b/src/xrt/auxiliary/util/u_time.cpp @@ -4,6 +4,7 @@ * @file * @brief Implementation of a steady, convertible clock. * @author Ryan Pavlik <ryan.pavlik@collabora.com> + * @ingroup aux_util */ #include "u_time.h" diff --git a/src/xrt/auxiliary/util/u_time.h b/src/xrt/auxiliary/util/u_time.h index 10f7230fc8442b9257443284f24de1333010e0b5..54b1ca2251d317ca02102308dc91d2519da97e01 100644 --- a/src/xrt/auxiliary/util/u_time.h +++ b/src/xrt/auxiliary/util/u_time.h @@ -5,6 +5,7 @@ * @brief Time-keeping: a clock that is steady, convertible to system time, and * ideally high-resolution. * @author Ryan Pavlik <ryan.pavlik@collabora.com> + * @ingroup aux_util * * @see time_state */ @@ -23,6 +24,7 @@ extern "C" { * * @see time_state * @see time_duration_ns + * @ingroup aux_util */ typedef int64_t timepoint_ns; @@ -33,6 +35,7 @@ typedef int64_t timepoint_ns; * * @see time_state * @see timepoint_ns + * @ingroup aux_util */ typedef int64_t time_duration_ns; @@ -40,6 +43,7 @@ typedef int64_t time_duration_ns; * Convert nanoseconds duration to float seconds. * * @see timepoint_ns + * @ingroup aux_util */ static inline float time_ns_to_s(time_duration_ns ns) @@ -51,6 +55,7 @@ time_ns_to_s(time_duration_ns ns) * Convert float seconds to nanoseconds. * * @see timepoint_ns + * @ingroup aux_util */ static inline time_duration_ns time_s_to_ns(float duration) @@ -65,6 +70,7 @@ time_s_to_ns(float duration) * Exposed as an opaque pointer. * * @see timepoint_ns + * @ingroup aux_util */ struct time_state; @@ -72,6 +78,7 @@ struct time_state; * Create a struct time_state. * * @public @memberof time_state + * @ingroup aux_util */ struct time_state* time_state_create(); @@ -83,6 +90,7 @@ time_state_create(); * Should not be called simultaneously with any other time_state function. * * @public @memberof time_state + * @ingroup aux_util */ void time_state_destroy(struct time_state* state); @@ -94,6 +102,7 @@ time_state_destroy(struct time_state* state); * Should not be called simultaneously with time_state_get_now_and_update. * * @public @memberof time_state + * @ingroup aux_util */ timepoint_ns time_state_get_now(struct time_state const* state); @@ -107,6 +116,7 @@ time_state_get_now(struct time_state const* state); * Should not be called simultaneously with any other time_state function. * * @public @memberof time_state + * @ingroup aux_util */ timepoint_ns time_state_get_now_and_update(struct time_state* state); @@ -117,6 +127,7 @@ time_state_get_now_and_update(struct time_state* state); * Should not be called simultaneously with time_state_get_now_and_update. * * @public @memberof time_state + * @ingroup aux_util */ void time_state_to_timespec(struct time_state const* state, @@ -129,6 +140,7 @@ time_state_to_timespec(struct time_state const* state, * Should not be called simultaneously with time_state_get_now_and_update. * * @public @memberof time_state + * @ingroup aux_util */ timepoint_ns time_state_from_timespec(struct time_state const* state,