input gpio regular constructor

This commit is contained in:
Jakob Meier 2021-05-17 14:02:27 +02:00
parent 6341da2212
commit 7724fdc389

View File

@ -66,13 +66,21 @@ public:
class GpiodRegular: public GpioBase {
public:
GpiodRegular(): GpioBase(gpio::GpioTypes::GPIOD_REGULAR, std::string(),
gpio::Direction::IN, 0) {};
GpiodRegular() :
GpioBase(gpio::GpioTypes::GPIOD_REGULAR, std::string(), gpio::Direction::IN, 0) {
}
;
GpiodRegular(std::string chipname_, int lineNum_, std::string consumer_,
gpio::Direction direction_, int initValue_):
GpioBase(gpio::GpioTypes::GPIOD_REGULAR, consumer_, direction_, initValue_),
chipname(chipname_), lineNum(lineNum_) {}
gpio::Direction direction_, int initValue_) :
GpioBase(gpio::GpioTypes::GPIOD_REGULAR, consumer_, direction_, initValue_), chipname(
chipname_), lineNum(lineNum_) {
}
GpiodRegular(std::string chipname_, int lineNum_, std::string consumer_) :
GpioBase(gpio::GpioTypes::GPIOD_REGULAR, consumer_, gpio::Direction::IN, 0), chipname(
chipname_), lineNum(lineNum_) {
}
std::string chipname;
int lineNum = 0;
struct gpiod_line* lineHandle = nullptr;