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>
This commit is contained in:
Jacopo Mondi 2020-02-26 10:38:38 +01:00 committed by Laurent Pinchart
parent 8b12a161e0
commit 97cba0ebea
3 changed files with 29 additions and 3 deletions

View file

@ -22,6 +22,7 @@ class ControlValidator;
enum ControlType {
ControlTypeNone,
ControlTypeBool,
ControlTypeByte,
ControlTypeInteger32,
ControlTypeInteger64,
ControlTypeFloat,
@ -43,6 +44,11 @@ struct control_type<bool> {
static constexpr ControlType value = ControlTypeBool;
};
template<>
struct control_type<uint8_t> {
static constexpr ControlType value = ControlTypeByte;
};
template<>
struct control_type<int32_t> {
static constexpr ControlType value = ControlTypeInteger32;