summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Device/Device.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/Device/Device.h b/include/Device/Device.h
index 7a20f04..e02c352 100644
--- a/include/Device/Device.h
+++ b/include/Device/Device.h
@@ -128,9 +128,25 @@ class Device {
void AddToDeviceInfo(const std::string Port,
const std::string ProductID);
};
+
+ class gpio_request {
+ private:
+ struct gpiod_request_config *request_config;
+ struct gpiod_line_config *line_config;
+ struct gpiod_line_settings *settings;
+ struct gpiod_line_request *line_request; // Result of creating a request
+ struct gpiod_chip *chip;
+ unsigned int rq_offset;
+ struct gpiod_chip *gpiod_ctxless_find_line(Device *device, std::string name, unsigned int *r_offset);
+ public:
+ struct gpiod_line_request *request();
+ unsigned int offset();
+ gpio_request(Device *device, const std::string name);
+ ~gpio_request();
+ };
std::vector<std::unique_ptr<AccessoryCard>> accessoryCardsList;
-
+
public:
Device();
void getSystemTreeJson(const char *dir_name);
@@ -158,6 +174,7 @@ class Device {
void Verbose(bool val);
bool Verbose();
void writeJson();
+ void simpleError(std::string msg, int error, int exitval);
};
#endif /* DEVICE_H_ */