mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Driver: Switch to libredxx
- no more libFTDI - no more libusb on Linux and macOS - no more FTDI repack - no more binary libs - faster D2XX on Windows (no longer uses COM)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#ifndef __DXX_H_
|
||||
#define __DXX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/device/founddevice.h"
|
||||
|
||||
#include "libredxx/libredxx.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class DXX : public Driver {
|
||||
public:
|
||||
static void Find(std::vector<FoundDevice>& found);
|
||||
|
||||
DXX(const device_eventhandler_t& err, neodevice_t& forDevice, uint16_t pid, libredxx_device_type type);
|
||||
|
||||
bool open() override;
|
||||
|
||||
bool isOpen() override;
|
||||
|
||||
bool close() override;
|
||||
|
||||
private:
|
||||
void read();
|
||||
void write();
|
||||
neodevice_t neodevice;
|
||||
uint16_t pid;
|
||||
libredxx_device_type type;
|
||||
libredxx_opened_device* device = nullptr;
|
||||
std::thread readThread;
|
||||
std::thread writeThread;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // __DXX_H_
|
||||
Reference in New Issue
Block a user