summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/AccessoryCards/AccessoryCardLora.h16
-rw-r--r--include/AccessoryCards/AccessoryCardLora15.h18
-rw-r--r--include/Device/Device.h11
3 files changed, 5 insertions, 40 deletions
diff --git a/include/AccessoryCards/AccessoryCardLora.h b/include/AccessoryCards/AccessoryCardLora.h
deleted file mode 100644
index 28f62ff..0000000
--- a/include/AccessoryCards/AccessoryCardLora.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef ACCESSORYCARDLORA_H_
-#define ACCESSORYCARDLORA_H_
-
-#include "General.h"
-
-class AccessoryCardLora {
- private:
- std::string spiPath;
- std::string productId;
- std::string port;
- public:
- AccessoryCardLora(std::string ProductId, std::string Port);
- std::string getPath();
-};
-
-#endif /* ACCESSORYCARDLORA_H_ */
diff --git a/include/AccessoryCards/AccessoryCardLora15.h b/include/AccessoryCards/AccessoryCardLora15.h
deleted file mode 100644
index b1a9d64..0000000
--- a/include/AccessoryCards/AccessoryCardLora15.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef ACCESSORYCARDLORA15_H_
-#define ACCESSORYCARDLORA15_H_
-
-#include "General.h"
-#include "AccessoryCardLora.h"
-
-class AccessoryCardLora15 : private AccessoryCardLora {
- private:
- void *spi_target_ptr = NULL;
- public:
- AccessoryCardLora15(std::string ProductId, std::string Port);
- int spiOpen(const char *spidev);
- int spiRead(uint8_t address, uint8_t *data);
- int spiClose();
- uint8_t getFPGAVersion();
-};
-
-#endif /* ACCESSORYCARDLORA15_H_ */
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);
};