rk3399_arm_lvds/deviceio/Led.h

25 lines
436 B
C++

#pragma once
#include "DevUtil.h"
class Led
{
public:
static std::string timer;
static std::string none;
public:
Led(std::string name);
~Led();
void on(int time_ms = 0);
void off();
bool isOn();
private:
const std::string path_base = "/sys/class/leds";
std::string path_brightness = "brightness";
std::string path_trigger = "trigger";
std::string path_delay_off = "delay_off";
std::string path_delay_on = "delay_on";
};