|
Veethree D7 SDK
|
The rgb_button_backlight class.
This class is responsible for setting a button backlight colour. Once a button colour is set, the class caches the last value set so it is possible to know the button backlight state.
button1 (index 0) is the top most button, button6 (index 5) is the bottom most button. There are 6 buttons in total (use button_count).
#include <button_backlight.h>
Public Member Functions | |
| rgb_button_backlight (uint32_t id) | |
| The class constructor. | |
| rgb_button_backlight (rgb_button_backlight &&) noexcept | |
| The class move constructor. | |
| ~rgb_button_backlight () noexcept | |
| The class destructor. | |
| rgb_button_backlight (const rgb_button_backlight &)=delete | |
| rgb_button_backlight & | operator= (const rgb_button_backlight &)=delete |
| rgb_button_backlight & | operator= (rgb_button_backlight &&) noexcept |
| The class move assignment operator. | |
| void | set_colour (uint8_t red, uint8_t green, uint8_t blue) |
| Set all colour components. | |
| std::tuple< uint8_t, uint8_t, uint8_t > | colour () const |
| Get all colour components as a std::tuple. | |
| uint32_t | id () const |
| Return the button id assigned to the object on its instantiation. | |
| void | set_red (uint8_t r) |
| Set individual colour components (0-255). | |
| void | set_green (uint8_t g) |
| Set individual colour components (0-255). | |
| void | set_blue (uint8_t b) |
| Set individual colour components (0-255). | |
| uint8_t | red () const |
| Return an individual colour component (0-255). | |
| uint8_t | green () const |
| Return an individual colour component (0-255). | |
| uint8_t | blue () const |
| Return an individual colour component (0-255). | |
The rgb_button_backlight class.
This class is responsible for setting a button backlight colour. Once a button colour is set, the class caches the last value set so it is possible to know the button backlight state.
button1 (index 0) is the top most button, button6 (index 5) is the bottom most button. There are 6 buttons in total (use button_count).
|
explicit |
The class constructor.
| id | The button Id. |
| std::tuple< uint8_t, uint8_t, uint8_t > vsdk::sys::rgb_button_backlight::colour | ( | ) | const |
Get all colour components as a std::tuple.
It is recommended to use structured binding with this function. For example:
| uint32_t vsdk::sys::rgb_button_backlight::id | ( | ) | const |
Return the button id assigned to the object on its instantiation.
| void vsdk::sys::rgb_button_backlight::set_colour | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue ) |
Set all colour components.
| red | The red component (0-255) |
| green | The green component (0-255) |
| blue | The blue component (0-255) |