diff options
author | John Klug <john.klug@multitech.com> | 2023-11-08 14:17:55 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2023-11-08 14:24:41 -0600 |
commit | a826d13ae7b3e20648566ddecca23bd6fe8f856b (patch) | |
tree | 9bf8cf2ef563de953e581493aeb6d5ac60e1a2e1 /include | |
parent | ced9991aafb6b1b30649fd34b0d17399686d4843 (diff) | |
download | mts-io-sysfs-a826d13ae7b3e20648566ddecca23bd6fe8f856b.tar.gz mts-io-sysfs-a826d13ae7b3e20648566ddecca23bd6fe8f856b.tar.bz2 mts-io-sysfs-a826d13ae7b3e20648566ddecca23bd6fe8f856b.zip |
libgpiod 2 added for GPIO store and show in IOTR/MTR3
Diffstat (limited to 'include')
-rw-r--r-- | include/Device/Device.h | 19 |
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_ */ |