summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-02-26 10:38:38 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-06 18:10:37 +0200
commit97cba0ebea6e553065f77f18471b3a5997c390d4 (patch)
tree5ae59ca67d9a86dae7cea6620b6baee200db0c7e /include
parent8b12a161e0280c086dfc037570ab8aee4c16bdaf (diff)
libcamera: controls: Add support for byte controls
Add support for byte values to the control framework and to the control serializer. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/controls.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 0ad442b9..4767e2d3 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -22,6 +22,7 @@ class ControlValidator;
enum ControlType {
ControlTypeNone,
ControlTypeBool,
+ ControlTypeByte,
ControlTypeInteger32,
ControlTypeInteger64,
ControlTypeFloat,
@@ -44,6 +45,11 @@ struct control_type<bool> {
};
template<>
+struct control_type<uint8_t> {
+ static constexpr ControlType value = ControlTypeByte;
+};
+
+template<>
struct control_type<int32_t> {
static constexpr ControlType value = ControlTypeInteger32;
};