mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
POSIX: STM32: Check re-enumeration by inode
This is much more stable than waiting for a set amount of time We still timeout at 5s, if we see that being hit it can be increased
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/device/neodevice.h"
|
||||
#include "icsneo/api/eventmanager.h"
|
||||
#include "icsneo/platform/optional.h"
|
||||
#include <chrono>
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace icsneo {
|
||||
@@ -37,6 +39,7 @@ public:
|
||||
private:
|
||||
neodevice_t& device;
|
||||
int fd = -1;
|
||||
optional<ino_t> disallowedInode;
|
||||
std::atomic<bool> modeChanging{false};
|
||||
std::thread modeChangeThread;
|
||||
std::mutex modeChangeMutex;
|
||||
|
||||
Reference in New Issue
Block a user