Skip to content
Snippets Groups Projects
Commit d1b91e54 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz
Browse files

aux/util: Group the files and structs in documentation

parent 6355f02a
No related branches found
No related tags found
No related merge requests found
......@@ -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
)
......
......@@ -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.
*/
......
......@@ -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.
*/
......
......@@ -4,6 +4,7 @@
* @file
* @brief Misc helpers for device drivers.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup aux_util
*/
#include <math.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,
......
// 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.
*/
......@@ -4,6 +4,7 @@
* @file
* @brief Very small misc utils.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @ingroup aux_util
*/
#include "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)))
......
......@@ -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"
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment