diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-09 12:10:01 -0600 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-09 12:10:01 -0600 |
commit | 8c7856e74ba7bc149180aa3ab9f820043260cdc8 (patch) | |
tree | 5b8d0f9a6ce3f78fc9caaa5afe107afb4c7d3e81 /include/Device | |
parent | d32e7c87879f19951b707617cb7291339be86309 (diff) | |
download | mts-io-sysfs-8c7856e74ba7bc149180aa3ab9f820043260cdc8.tar.gz mts-io-sysfs-8c7856e74ba7bc149180aa3ab9f820043260cdc8.tar.bz2 mts-io-sysfs-8c7856e74ba7bc149180aa3ab9f820043260cdc8.zip |
Added spidev as to accessory card object, moved setting capabilities for lora accessory cards to a common base class function
Diffstat (limited to 'include/Device')
-rw-r--r-- | include/Device/Device.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/Device/Device.h b/include/Device/Device.h index aa1d32b..86e284f 100644 --- a/include/Device/Device.h +++ b/include/Device/Device.h @@ -4,7 +4,6 @@ #include "General.h" #include "Utility.h" #include "Version.h" -#include "AccessoryCardLora15.h" class Device { private: @@ -32,7 +31,6 @@ class Device { static const std::regex storeFilters; static const std::regex showFilters; - class AccessoryCard { protected: Device& device; @@ -43,14 +41,15 @@ class Device { class LoraCard : public AccessoryCard { protected: std::string spiPath; + uint8_t fpgaVersion = 255; public: - LoraCard(Device& d, const std::string productId, const std::string port); + LoraCard(Device& d, const std::string productId, const std::string port); + void setCapabilities(); }; class Lora15Card : public LoraCard { private: void *spi_target_ptr = NULL; - uint8_t fpgaVersion = 255; public: Lora15Card(Device& d, const std::string productId, const std::string port); int spiOpen(const char *spidev); @@ -60,14 +59,14 @@ class Device { class Lora21Card : public LoraCard { private: - std::string fpgaVersion; + std::string cmdFpgaVersion; public: Lora21Card(Device& d, const std::string productId, const std::string port); }; class Lora21ExtCard : public Lora21Card { private: - std::string fpgaVersion2; + std::string cmdFpgaVersion2; public: Lora21ExtCard(Device& d, const std::string productId, const std::string port); }; |