mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
This allows us to better implement alternative drivers for devices, such as for device sharing servers or talking to CoreMini processors within the same device.
14 lines
474 B
C++
14 lines
474 B
C++
#include "icsneo/device/neodevice.h"
|
|
#include "icsneo/device/founddevice.h"
|
|
#include <cstring>
|
|
|
|
neodevice_t::neodevice_t() : device(nullptr), handle(0), type(0) {
|
|
memset(serial, 0, sizeof(serial));
|
|
}
|
|
|
|
neodevice_t::neodevice_t(const icsneo::FoundDevice& found, devicetype_t inType)
|
|
: device(nullptr), handle(found.handle), type(inType) {
|
|
static_assert(sizeof(found.serial) == sizeof(serial), "Serial sizes should match!");
|
|
memcpy(serial, found.serial, sizeof(serial));
|
|
}
|