summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/cam_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper.cpp')
0 files changed, 0 insertions, 0 deletions
n77' href='#n77'>77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * {{mode}} ID list
 *
 * This file is auto-generated. Do not edit.
 */

#include <libcamera/{{filename}}.h>
#include <libcamera/controls.h>

/**
 * \file {{filename}}.h
 * \brief Camera {{mode}} identifiers
 */

namespace libcamera {

/**
 * \brief Namespace for libcamera {{mode}}
 */
namespace {{mode}} {

{%- for vendor, ctrls in controls -%}

{%- if vendor != 'libcamera' %}
/**
 * \brief Namespace for {{vendor}} {{mode}}
 */
namespace {{vendor}} {
{%- endif -%}

{% for ctrl in ctrls %}

{% if ctrl.is_enum -%}
/**
 * \enum {{ctrl.name}}Enum
 * \brief Supported {{ctrl.name}} values
{%- for enum in ctrl.enum_values %}
 *
 * \var {{enum.name}}
 * \brief {{enum.description|format_description}}
{%- endfor %}
 */

/**
 * \var {{ctrl.name}}Values
 * \brief List of all {{ctrl.name}} supported values
 */

/**
 * \var {{ctrl.name}}NameValueMap
 * \brief Map of all {{ctrl.name}} supported value names (in std::string format) to value
 */

{% endif -%}
/**
 * \var {{ctrl.name}}
 * \brief {{ctrl.description|format_description}}
 */
{%- endfor %}
{% if vendor != 'libcamera' %}
} /* namespace {{vendor}} */
{% endif -%}

{%- endfor %}

#ifndef __DOXYGEN__
/*
 * Keep the {{mode}} definitions hidden from doxygen as it incorrectly parses
 * them as functions.
 */
{% for vendor, ctrls in controls -%}

{% if vendor != 'libcamera' %}
namespace {{vendor}} {
{% endif %}

{%- for ctrl in ctrls %}
{% if ctrl.is_enum -%}
extern const std::array<const ControlValue, {{ctrl.enum_values_count}}> {{ctrl.name}}Values = {
{%- for enum in ctrl.enum_values %}
	static_cast<{{ctrl.type}}>({{enum.name}}),
{%- endfor %}
};
extern const std::map<std::string, {{ctrl.type}}> {{ctrl.name}}NameValueMap = {
{%- for enum in ctrl.enum_values %}
	{ "{{enum.name}}", {{enum.name}} },
{%- endfor %}
};
extern const Control<{{ctrl.type}}> {{ctrl.name}}({{ctrl.name|snake_case|upper}}, "{{ctrl.name}}", {{ctrl.name}}NameValueMap);
{% else -%}
extern const Control<{{ctrl.type}}> {{ctrl.name}}({{ctrl.name|snake_case|upper}}, "{{ctrl.name}}");
{% endif -%}
{%- endfor %}

{% if vendor != 'libcamera' %}
} /* namespace {{vendor}} */
{% endif -%}

{%- endfor %}
#endif /* __DOXYGEN__ */

/**
 * \brief List of all supported libcamera {{mode}}
{%- if mode == 'controls' %}
 *
 * Unless otherwise stated, all controls are bi-directional, i.e. they can be
 * set through Request::controls() and returned out through Request::metadata().
{%- endif %}
 */
extern const ControlIdMap {{mode}} {
{%- for vendor, ctrls in controls -%}
{%- for ctrl in ctrls %}
	{ {{ctrl.namespace}}{{ctrl.name|snake_case|upper}}, &{{ctrl.namespace}}{{ctrl.name}} },
{%- endfor -%}
{%- endfor %}
};

} /* namespace {{mode}} */

} /* namespace libcamera */