mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Driver: Add FTD3XX
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef __FTD3XX_H_
|
||||
#define __FTD3XX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "icsneo/communication/driver.h"
|
||||
#include "icsneo/device/founddevice.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class FTD3XX : public Driver {
|
||||
public:
|
||||
static void Find(std::vector<FoundDevice>& foundDevices);
|
||||
FTD3XX(const device_eventhandler_t& err, neodevice_t& forDevice);
|
||||
~FTD3XX() override { if(isOpen()) close(); }
|
||||
bool open() override;
|
||||
bool isOpen() override;
|
||||
bool close() override;
|
||||
bool isEthernet() const override { return false; }
|
||||
private:
|
||||
neodevice_t& device;
|
||||
std::optional<void*> handle;
|
||||
void readTask() override;
|
||||
void writeTask() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef __FTDI3_H_
|
||||
#define __FTDI3_H_
|
||||
|
||||
#define INTREPID_USB_VENDOR_ID (0x093c)
|
||||
|
||||
// This is currently a stub for the FTDI3 driver,
|
||||
// it uses the FTDI driver to find devices but will
|
||||
// not allow them to connect!
|
||||
#define FTDI3 FTDI
|
||||
|
||||
#if defined _WIN32
|
||||
#include "icsneo/platform/windows/ftdi.h"
|
||||
#elif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
|
||||
#include "icsneo/platform/posix/ftdi.h"
|
||||
#else
|
||||
#warning "This platform is not supported by the FTDI driver"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user