Repo: Normalize source files to LF

This commit is contained in:
Paul Hollinsky
2022-03-27 14:40:32 -04:00
parent 781fc2c034
commit 008a1620c8
36 changed files with 3779 additions and 3779 deletions
+19 -19
View File
@@ -1,20 +1,20 @@
#ifndef __CDCACM_WINDOWS_H_
#define __CDCACM_WINDOWS_H_
#ifdef __cplusplus
#include "icsneo/platform/windows/vcp.h"
namespace icsneo {
class CDCACM : public VCP {
public:
CDCACM(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {}
static void Find(std::vector<FoundDevice>& found) { return VCP::Find(found, { L"usbser" }); }
};
}
#endif // __cplusplus
#ifndef __CDCACM_WINDOWS_H_
#define __CDCACM_WINDOWS_H_
#ifdef __cplusplus
#include "icsneo/platform/windows/vcp.h"
namespace icsneo {
class CDCACM : public VCP {
public:
CDCACM(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {}
static void Find(std::vector<FoundDevice>& found) { return VCP::Find(found, { L"usbser" }); }
};
}
#endif // __cplusplus
#endif
+19 -19
View File
@@ -1,20 +1,20 @@
#ifndef __DYNAMICLIB_WINDOWS_H_
#define __DYNAMICLIB_WINDOWS_H_
#include "icsneo/platform/windows.h"
#ifdef ICSNEOC_MAKEDLL
#define DLLExport __declspec(dllexport)
#else
#define DLLExport __declspec(dllimport)
#endif
#define LegacyDLLExport DLLExport _stdcall
// MSVC does not have the ability to specify a destructor
#define ICSNEO_DESTRUCTOR
#define icsneo_dynamicLibraryLoad() LoadLibrary(TEXT("icsneoc.dll"))
#define icsneo_dynamicLibraryGetFunction(handle, func) GetProcAddress((HMODULE) handle, func)
#define icsneo_dynamicLibraryClose(handle) FreeLibrary((HMODULE) handle)
#ifndef __DYNAMICLIB_WINDOWS_H_
#define __DYNAMICLIB_WINDOWS_H_
#include "icsneo/platform/windows.h"
#ifdef ICSNEOC_MAKEDLL
#define DLLExport __declspec(dllexport)
#else
#define DLLExport __declspec(dllimport)
#endif
#define LegacyDLLExport DLLExport _stdcall
// MSVC does not have the ability to specify a destructor
#define ICSNEO_DESTRUCTOR
#define icsneo_dynamicLibraryLoad() LoadLibrary(TEXT("icsneoc.dll"))
#define icsneo_dynamicLibraryGetFunction(handle, func) GetProcAddress((HMODULE) handle, func)
#define icsneo_dynamicLibraryClose(handle) FreeLibrary((HMODULE) handle)
#endif
+19 -19
View File
@@ -1,20 +1,20 @@
#ifndef __FTDI_WINDOWS_H_
#define __FTDI_WINDOWS_H_
#ifdef __cplusplus
#include "icsneo/platform/windows/vcp.h"
namespace icsneo {
class FTDI : public VCP {
public:
FTDI(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {}
static void Find(std::vector<FoundDevice>& found) { return VCP::Find(found, { L"serenum" /*, L"ftdibus" */ }); }
};
}
#endif // __cplusplus
#ifndef __FTDI_WINDOWS_H_
#define __FTDI_WINDOWS_H_
#ifdef __cplusplus
#include "icsneo/platform/windows/vcp.h"
namespace icsneo {
class FTDI : public VCP {
public:
FTDI(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {}
static void Find(std::vector<FoundDevice>& found) { return VCP::Find(found, { L"serenum" /*, L"ftdibus" */ }); }
};
}
#endif // __cplusplus
#endif
+27 -27
View File
@@ -1,28 +1,28 @@
#ifndef __REGISTRY_WINDOWS_H_
#define __REGISTRY_WINDOWS_H_
#ifdef __cplusplus
#include <string>
#include <vector>
namespace icsneo {
class Registry {
public:
static bool EnumerateSubkeys(std::wstring path, std::vector<std::wstring>& subkeys);
// Get string value
static bool Get(std::wstring path, std::wstring key, std::wstring& value);
static bool Get(std::string path, std::string key, std::string& value);
// Get DWORD value
static bool Get(std::wstring path, std::wstring key, uint32_t& value);
static bool Get(std::string path, std::string key, uint32_t& value);
};
}
#endif // __cplusplus
#ifndef __REGISTRY_WINDOWS_H_
#define __REGISTRY_WINDOWS_H_
#ifdef __cplusplus
#include <string>
#include <vector>
namespace icsneo {
class Registry {
public:
static bool EnumerateSubkeys(std::wstring path, std::vector<std::wstring>& subkeys);
// Get string value
static bool Get(std::wstring path, std::wstring key, std::wstring& value);
static bool Get(std::string path, std::string key, std::string& value);
// Get DWORD value
static bool Get(std::wstring path, std::wstring key, uint32_t& value);
static bool Get(std::string path, std::string key, uint32_t& value);
};
}
#endif // __cplusplus
#endif
+47 -47
View File
@@ -1,48 +1,48 @@
#ifndef __VCP_WINDOWS_H_
#define __VCP_WINDOWS_H_
#ifdef __cplusplus
#include <vector>
#include <string>
#include <thread>
#include <atomic>
#include <chrono>
#include "icsneo/device/neodevice.h"
#include "icsneo/communication/driver.h"
#include "icsneo/api/eventmanager.h"
namespace icsneo {
// Virtual COM Port Communication
class VCP : public Driver {
public:
static void Find(std::vector<FoundDevice>& found, std::vector<std::wstring> driverName);
static bool IsHandleValid(neodevice_handle_t handle);
typedef void(*fn_boolCallback)(bool success);
VCP(const device_eventhandler_t& err, neodevice_t& forDevice);
~VCP() { close(); }
bool open() { return open(false); }
void openAsync(fn_boolCallback callback);
bool close();
bool isOpen();
private:
bool open(bool fromAsync);
bool opening = false;
neodevice_t& device;
struct Detail;
std::shared_ptr<Detail> detail;
std::vector<std::shared_ptr<std::thread>> threads;
void readTask();
void writeTask();
};
}
#endif // __cplusplus
#ifndef __VCP_WINDOWS_H_
#define __VCP_WINDOWS_H_
#ifdef __cplusplus
#include <vector>
#include <string>
#include <thread>
#include <atomic>
#include <chrono>
#include "icsneo/device/neodevice.h"
#include "icsneo/communication/driver.h"
#include "icsneo/api/eventmanager.h"
namespace icsneo {
// Virtual COM Port Communication
class VCP : public Driver {
public:
static void Find(std::vector<FoundDevice>& found, std::vector<std::wstring> driverName);
static bool IsHandleValid(neodevice_handle_t handle);
typedef void(*fn_boolCallback)(bool success);
VCP(const device_eventhandler_t& err, neodevice_t& forDevice);
~VCP() { close(); }
bool open() { return open(false); }
void openAsync(fn_boolCallback callback);
bool close();
bool isOpen();
private:
bool open(bool fromAsync);
bool opening = false;
neodevice_t& device;
struct Detail;
std::shared_ptr<Detail> detail;
std::vector<std::shared_ptr<std::thread>> threads;
void readTask();
void writeTask();
};
}
#endif // __cplusplus
#endif