added option to open gpio by label instead of gpiochip*
This commit is contained in:
@ -85,7 +85,19 @@ public:
|
||||
GpioBase(gpio::GpioTypes::GPIO_REGULAR, consumer_, gpio::Direction::IN, 0),
|
||||
chipname(chipname_), lineNum(lineNum_) {
|
||||
}
|
||||
std::string chipname;
|
||||
|
||||
GpiodRegular(std::string consumer_, gpio::Direction direction_, int initValue_,
|
||||
std::string label_, int lineNum_) :
|
||||
GpioBase(gpio::GpioTypes::GPIO_REGULAR, consumer_, direction_, initValue_), label(
|
||||
label_), lineNum(lineNum_) {
|
||||
}
|
||||
|
||||
GpiodRegular(std::string consumer_, std::string label_, int lineNum_) :
|
||||
GpioBase(gpio::GpioTypes::GPIO_REGULAR, consumer_, gpio::Direction::IN, 0), label(
|
||||
label_), lineNum(lineNum_) {
|
||||
}
|
||||
std::string chipname = "NONE";
|
||||
std::string label = "NONE";
|
||||
int lineNum = 0;
|
||||
struct gpiod_line* lineHandle = nullptr;
|
||||
};
|
||||
|
Reference in New Issue
Block a user