libcamera: controls: Generate macro for each control
Generate a macro in the form of LIBCAMERA_HAS_$VENDOR_VENDOR_$MODE_$NAME for each control so that its existence can be checked easily and without extra version checks. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -49,6 +49,7 @@ extern const std::array<const ControlValue, {{ctrl.enum_values_count}}> {{ctrl.n
|
||||
extern const std::map<std::string, {{ctrl.type}}> {{ctrl.name}}NameValueMap;
|
||||
{% endif -%}
|
||||
extern const Control<{{ctrl.type}}> {{ctrl.name}};
|
||||
#define LIBCAMERA_HAS_{{vendor|upper}}_VENDOR_{{mode|upper}}_{{ctrl.name|snake_case|upper}}
|
||||
{% endfor -%}
|
||||
|
||||
{% if vendor != 'libcamera' %}
|
||||
|
||||
Reference in New Issue
Block a user