mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Add RAD-EpsilonXL
This commit is contained in:
committed by
Kyle Schwarz
parent
e1a0ca056a
commit
52e98af9fd
@@ -0,0 +1,63 @@
|
||||
#ifndef __RADEPSILONXL_H_
|
||||
#define __RADEPSILONXL_H_
|
||||
|
||||
#include "icsneo/device/device.h"
|
||||
#include "icsneo/device/devicetype.h"
|
||||
#include "icsneo/device/tree/radepsilon/radepsilonsettings.h" // Shared settings with RADEpsilon
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class RADEpsilonXL : public Device {
|
||||
public:
|
||||
// Serial numbers start with PX
|
||||
// USB PID is 0x1109, standard driver is CDCACM
|
||||
ICSNEO_FINDABLE_DEVICE(RADEpsilonXL, DeviceType::RADEpsilonXL, "PX");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
Network::NetID::HSCAN,
|
||||
Network::NetID::HSCAN2,
|
||||
|
||||
Network::NetID::Ethernet, // Connected to port 6 on the switch
|
||||
|
||||
Network::NetID::LIN
|
||||
};
|
||||
return supportedNetworks;
|
||||
}
|
||||
|
||||
bool supportsComponentVersions() const override { return true; }
|
||||
|
||||
protected:
|
||||
RADEpsilonXL(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<RADEpsilonSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||
}
|
||||
|
||||
virtual void setupEncoder(Encoder& encoder) override {
|
||||
Device::setupEncoder(encoder);
|
||||
encoder.supportCANFD = true;
|
||||
}
|
||||
|
||||
void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
|
||||
for(auto& netid : GetSupportedNetworks())
|
||||
rxNetworks.emplace_back(netid);
|
||||
}
|
||||
|
||||
// The supported TX networks are the same as the supported RX networks for this device
|
||||
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||
return 14*1024*1024;
|
||||
}
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool supportsEraseMemory() const override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace icsneo
|
||||
|
||||
#endif // __RADEPSILONXL_H_
|
||||
Reference in New Issue
Block a user