summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/libcamera/gen-controls.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libcamera/gen-controls.py b/src/libcamera/gen-controls.py
index 6f020a32..ff8bda6b 100755
--- a/src/libcamera/gen-controls.py
+++ b/src/libcamera/gen-controls.py
@@ -42,9 +42,14 @@ ${description}
name, ctrl = ctrl.popitem()
id_name = snake_case(name).upper()
+ if ctrl.get('size'):
+ ctrl_type = 'Span<const %s>' % ctrl['type']
+ else:
+ ctrl_type = ctrl['type']
+
info = {
'name': name,
- 'type': ctrl['type'],
+ 'type': ctrl_type,
'description': format_description(ctrl['description']),
'id_name': id_name,
}
@@ -92,9 +97,14 @@ def generate_h(controls):
ids.append('\t' + id_name + ' = ' + str(id_value) + ',')
+ if ctrl.get('size'):
+ ctrl_type = 'Span<const %s>' % ctrl['type']
+ else:
+ ctrl_type = ctrl['type']
+
info = {
'name': name,
- 'type': ctrl['type'],
+ 'type': ctrl_type,
}
enum = ctrl.get('enum')