Veethree D7 SDK
Loading...
Searching...
No Matches
src
system
button_backlight.h
Go to the documentation of this file.
1
5
#ifndef BUTTON_BACKLIGHT_H
6
#define BUTTON_BACKLIGHT_H
7
8
#include <cstdint>
9
#include <memory>
10
#include <tuple>
11
12
namespace
vsdk::sys
{
13
18
42
class
rgb_button_backlight
{
43
public
:
49
explicit
rgb_button_backlight
(uint32_t
id
);
53
rgb_button_backlight
(
rgb_button_backlight
&&) noexcept;
57
~
rgb_button_backlight
() noexcept;
58
59
rgb_button_backlight
(const
rgb_button_backlight
&) = delete;
60
rgb_button_backlight
& operator=(const
rgb_button_backlight
&) = delete;
61
65
rgb_button_backlight
& operator=(
rgb_button_backlight
&&) noexcept;
66
73
void
set_colour
(uint8_t
red
, uint8_t
green
, uint8_t
blue
);
78
void
set_red
(uint8_t r);
79
void
set_green
(uint8_t g);
80
void
set_blue
(uint8_t b);
82
93
std::tuple<uint8_t, uint8_t, uint8_t>
colour
() const;
98
uint8_t
red
() const;
99
uint8_t
green
() const;
100
uint8_t
blue
() const;
102
108
uint32_t
id
() const;
109
113
static constexpr uint32_t
button_count
{ 6 };
114
119
static
constexpr
uint32_t
button1
{ 0 };
120
static
constexpr
uint32_t
button2
{ 1 };
121
static
constexpr
uint32_t
button3
{ 2 };
122
static
constexpr
uint32_t
button4
{ 3 };
123
static
constexpr
uint32_t
button5
{ 4 };
124
static
constexpr
uint32_t
button6
{ 5 };
128
129
private
:
130
struct
impl;
131
std::unique_ptr<impl> _impl;
132
};
133
135
136
}
// namespace vsdk::sys
137
138
#endif
// BUTTON_BACKLIGHT_H
vsdk::sys::rgb_button_backlight::button5
static constexpr uint32_t button5
Button constants.
Definition
button_backlight.h:123
vsdk::sys::rgb_button_backlight::button2
static constexpr uint32_t button2
Button constants.
Definition
button_backlight.h:120
vsdk::sys::rgb_button_backlight::button4
static constexpr uint32_t button4
Button constants.
Definition
button_backlight.h:122
vsdk::sys::rgb_button_backlight::green
uint8_t green() const
Return an individual colour component (0-255).
vsdk::sys::rgb_button_backlight::set_red
void set_red(uint8_t r)
Set individual colour components (0-255).
vsdk::sys::rgb_button_backlight::rgb_button_backlight
rgb_button_backlight(uint32_t id)
The class constructor.
vsdk::sys::rgb_button_backlight::rgb_button_backlight
rgb_button_backlight(rgb_button_backlight &&) noexcept
The class move constructor.
vsdk::sys::rgb_button_backlight::red
uint8_t red() const
Return an individual colour component (0-255).
vsdk::sys::rgb_button_backlight::colour
std::tuple< uint8_t, uint8_t, uint8_t > colour() const
Get all colour components as a std::tuple.
vsdk::sys::rgb_button_backlight::blue
uint8_t blue() const
Return an individual colour component (0-255).
vsdk::sys::rgb_button_backlight::button_count
static constexpr uint32_t button_count
button_count Total button available in the device.
Definition
button_backlight.h:113
vsdk::sys::rgb_button_backlight::set_blue
void set_blue(uint8_t b)
Set individual colour components (0-255).
vsdk::sys::rgb_button_backlight::set_green
void set_green(uint8_t g)
Set individual colour components (0-255).
vsdk::sys::rgb_button_backlight::button6
static constexpr uint32_t button6
Button constants.
Definition
button_backlight.h:124
vsdk::sys::rgb_button_backlight::set_colour
void set_colour(uint8_t red, uint8_t green, uint8_t blue)
Set all colour components.
vsdk::sys::rgb_button_backlight::button1
static constexpr uint32_t button1
Button constants.
Definition
button_backlight.h:119
vsdk::sys::rgb_button_backlight::button3
static constexpr uint32_t button3
Button constants.
Definition
button_backlight.h:121
vsdk::sys
Any entities that belong to the system library.
Generated by
1.14.0