Veethree D7 SDK
Loading...
Searching...
No Matches
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
12namespace vsdk::sys {
13
18
43public:
49 explicit rgb_button_backlight(uint32_t id);
58
60 rgb_button_backlight& operator=(const rgb_button_backlight&) = delete;
61
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
129private:
130 struct impl;
131 std::unique_ptr<impl> _impl;
132};
133
135
136} // namespace vsdk::sys
137
138#endif // BUTTON_BACKLIGHT_H
static constexpr uint32_t button5
Button constants.
Definition button_backlight.h:123
static constexpr uint32_t button2
Button constants.
Definition button_backlight.h:120
static constexpr uint32_t button4
Button constants.
Definition button_backlight.h:122
uint8_t green() const
Return an individual colour component (0-255).
void set_red(uint8_t r)
Set individual colour components (0-255).
rgb_button_backlight(uint32_t id)
The class constructor.
rgb_button_backlight(rgb_button_backlight &&) noexcept
The class move constructor.
uint8_t red() const
Return an individual colour component (0-255).
std::tuple< uint8_t, uint8_t, uint8_t > colour() const
Get all colour components as a std::tuple.
uint8_t blue() const
Return an individual colour component (0-255).
static constexpr uint32_t button_count
button_count Total button available in the device.
Definition button_backlight.h:113
void set_blue(uint8_t b)
Set individual colour components (0-255).
void set_green(uint8_t g)
Set individual colour components (0-255).
static constexpr uint32_t button6
Button constants.
Definition button_backlight.h:124
void set_colour(uint8_t red, uint8_t green, uint8_t blue)
Set all colour components.
static constexpr uint32_t button1
Button constants.
Definition button_backlight.h:119
static constexpr uint32_t button3
Button constants.
Definition button_backlight.h:121
Any entities that belong to the system library.