Transmits now block when the buffer fills

This commit is contained in:
Paul Hollinsky
2019-05-02 16:33:44 -04:00
parent 5a6a1c990a
commit 6ffc364eba
14 changed files with 45 additions and 11 deletions
+1 -2
View File
@@ -16,7 +16,7 @@ class FTDI : public ICommunication {
public:
static std::vector<neodevice_t> FindByProduct(int product);
FTDI(device_errorhandler_t err, neodevice_t& forDevice);
FTDI(const device_errorhandler_t& err, neodevice_t& forDevice);
~FTDI() { close(); }
bool open();
bool close();
@@ -56,7 +56,6 @@ private:
bool openable; // Set to false in the constructor if the object has not been found in searchResultDevices
neodevice_t& device;
device_errorhandler_t err;
};
}
+1 -2
View File
@@ -11,7 +11,7 @@ namespace icsneo {
class STM32 : public ICommunication {
public:
STM32(device_errorhandler_t err, neodevice_t& forDevice) : device(forDevice), err(err) {}
STM32(const device_errorhandler_t& err, neodevice_t& forDevice) : ICommunication(err), device(forDevice) {}
static std::vector<neodevice_t> FindByProduct(int product);
bool open();
@@ -20,7 +20,6 @@ public:
private:
neodevice_t& device;
device_errorhandler_t err;
int fd = -1;
static constexpr neodevice_handle_t HANDLE_OFFSET = 10;