mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-24 07:47:49 -05:00
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/*---------------------------------------------------------*\
|
|
| LinuxLEDController_Linux.h |
|
|
| |
|
|
| Driver for Linux sysfs LEDs |
|
|
| |
|
|
| Adam Honse (calcprogrammer1@gmail.com) 25 Sep 2020 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-only |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#pragma once
|
|
|
|
#include <fstream>
|
|
|
|
class LinuxLEDController
|
|
{
|
|
public:
|
|
LinuxLEDController();
|
|
~LinuxLEDController();
|
|
|
|
std::string GetRedPath();
|
|
std::string GetBluePath();
|
|
std::string GetGreenPath();
|
|
|
|
void OpenRedPath(std::string red_path);
|
|
void OpenGreenPath(std::string green_path);
|
|
void OpenBluePath(std::string blue_path);
|
|
|
|
void SetRGB(unsigned char red, unsigned char grn, unsigned char blu);
|
|
private:
|
|
std::string led_r_path;
|
|
std::string led_g_path;
|
|
std::string led_b_path;
|
|
std::ofstream led_r_brightness;
|
|
std::ofstream led_g_brightness;
|
|
std::ofstream led_b_brightness;
|
|
};
|