mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-11-04 12:59:07 +01:00
Device: RAD-Gemini to RAD-Argos
This commit is contained in:
committed by
Kyle Schwarz
parent
7ef57e6737
commit
f4836f279f
@@ -138,7 +138,7 @@ enum class ChipID : icsneoc2_chip_id_t {
|
||||
RADMOONT1S_ZCHIP = icsneoc2_chip_id_radmoont1s_zchip,
|
||||
RADGigastar2_ZYNQ = icsneoc2_chip_id_radgigastar2_zynq,
|
||||
SFPModule_ent11100_MCHIP = icsneoc2_chip_id_sfpmodule_ent11100_mchip,
|
||||
RADGemini_MCHIP = icsneoc2_chip_id_radgemini_mchip,
|
||||
RADArgos_MCHIP = icsneoc2_chip_id_radargos_mchip,
|
||||
Invalid = icsneoc2_chip_id_invalid
|
||||
};
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
RADMoonT1S = 56,
|
||||
RADGigastar2 = 57,
|
||||
SFPModule_ent11100 = 58,
|
||||
RADGemini = 60,
|
||||
RADArgos = 60,
|
||||
};
|
||||
|
||||
virtual ProductID getProductID() const = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
RADGigastar2 = icsneoc2_devicetype_rad_gigastar2,
|
||||
FIRE3_T1S_LIN = icsneoc2_devicetype_fire3_t1s_lin,
|
||||
FIRE3_T1S_SENT = icsneoc2_devicetype_fire3_t1s_sent,
|
||||
RADGemini = icsneoc2_devicetype_rad_gemini,
|
||||
RADArgos = icsneoc2_devicetype_rad_argos,
|
||||
RED = icsneoc2_devicetype_red,
|
||||
ECU = icsneoc2_devicetype_ecu,
|
||||
IEVB = icsneoc2_devicetype_ievb,
|
||||
@@ -153,8 +153,8 @@ public:
|
||||
return "RAD-EpsilonXL";
|
||||
case RADMoon3:
|
||||
return "RAD-Moon 3";
|
||||
case RADGemini:
|
||||
return "RAD-Gemini";
|
||||
case RADArgos:
|
||||
return "RAD-Argos";
|
||||
case RADComet2:
|
||||
return "RAD-Comet 2";
|
||||
case RED:
|
||||
@@ -281,7 +281,7 @@ private:
|
||||
#define ICSNEO_DEVICETYPE_RADGIGASTAR2 ((devicetype_t)icsneoc2_devicetype_rad_gigastar2)
|
||||
#define ICSNEO_DEVICETYPE_FIRE3_T1S_LIN ((devicetype_t)icsneoc2_devicetype_fire3_t1s_lin)
|
||||
#define ICSNEO_DEVICETYPE_FIRE3_T1S_SENT ((devicetype_t)icsneoc2_devicetype_fire3_t1s_sent)
|
||||
#define ICSNEO_DEVICETYPE_RADGEMINI ((devicetype_t)icsneoc2_devicetype_rad_gemini)
|
||||
#define ICSNEO_DEVICETYPE_RADARGOS ((devicetype_t)icsneoc2_devicetype_rad_argos)
|
||||
#define ICSNEO_DEVICETYPE_RED ((devicetype_t)icsneoc2_devicetype_red)
|
||||
#define ICSNEO_DEVICETYPE_ECU ((devicetype_t)icsneoc2_devicetype_ecu)
|
||||
#define ICSNEO_DEVICETYPE_IEVB ((devicetype_t)icsneoc2_devicetype_ievb)
|
||||
|
||||
+12
-12
@@ -1,19 +1,19 @@
|
||||
#ifndef __RADGEMINI_H_
|
||||
#define __RADGEMINI_H_
|
||||
#ifndef __RADARGOS_H_
|
||||
#define __RADARGOS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/device/device.h"
|
||||
#include "icsneo/device/devicetype.h"
|
||||
#include "icsneo/device/tree/radgemini/radgeminisettings.h"
|
||||
#include "icsneo/device/tree/radargos/radargossettings.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class RADGemini : public Device {
|
||||
class RADArgos : public Device {
|
||||
public:
|
||||
// Serial numbers start with GE
|
||||
// USB PID is 0x110E, standard driver is CDCACM
|
||||
ICSNEO_FINDABLE_DEVICE(RADGemini, DeviceType::RADGemini, "GE");
|
||||
ICSNEO_FINDABLE_DEVICE(RADArgos, DeviceType::RADArgos, "GE");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
@@ -28,11 +28,11 @@ public:
|
||||
|
||||
bool supportsTC10() const override { return true; }
|
||||
|
||||
ProductID getProductID() const override { return ProductID::RADGemini; }
|
||||
ProductID getProductID() const override { return ProductID::RADArgos; }
|
||||
|
||||
const std::vector<ChipInfo>& getChipInfo() const override {
|
||||
static std::vector<ChipInfo> chips = {
|
||||
{ChipID::RADGemini_MCHIP, true, "MCHIP", "radgemini_mchip_ief", 0, FirmwareType::IEF},
|
||||
{ChipID::RADArgos_MCHIP, true, "MCHIP", "radargos_mchip_ief", 0, FirmwareType::IEF},
|
||||
};
|
||||
return chips;
|
||||
}
|
||||
@@ -40,15 +40,15 @@ public:
|
||||
BootloaderPipeline getBootloader() override {
|
||||
return BootloaderPipeline()
|
||||
.add<EnterBootloaderPhase>()
|
||||
.add<FlashPhase>(ChipID::RADGemini_MCHIP, BootloaderCommunication::RED)
|
||||
.add<EnterApplicationPhase>(ChipID::RADGemini_MCHIP)
|
||||
.add<FlashPhase>(ChipID::RADArgos_MCHIP, BootloaderCommunication::RED)
|
||||
.add<EnterApplicationPhase>(ChipID::RADArgos_MCHIP)
|
||||
.add<ReconnectPhase>()
|
||||
.add<WaitPhase>(std::chrono::milliseconds(3000));
|
||||
}
|
||||
|
||||
protected:
|
||||
RADGemini(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<RADGeminiSettings>(makeDriver);
|
||||
RADArgos(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<RADArgosSettings>(makeDriver);
|
||||
}
|
||||
|
||||
void setupPacketizer(Packetizer& packetizer) override {
|
||||
@@ -74,4 +74,4 @@ protected:
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __RADGEMINI_H_
|
||||
#endif // __RADARGOS_H_
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
#ifndef LIBICSNEO_RADGEMINISETTINGS_H
|
||||
#define LIBICSNEO_RADGEMINISETTINGS_H
|
||||
#ifndef LIBICSNEO_RADARGOSSETTINGS_H
|
||||
#define LIBICSNEO_RADARGOSSETTINGS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "icsneo/device/idevicesettings.h"
|
||||
@@ -31,18 +31,18 @@ typedef struct {
|
||||
uint16_t enableLatencyTest : 1;
|
||||
uint16_t reserved : 15;
|
||||
} flags; // 2
|
||||
} radgemini_settings_t;
|
||||
} radargos_settings_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
static_assert(sizeof(radgemini_settings_t) == 86, "RADGemini settings size mismatch");
|
||||
static_assert(sizeof(radargos_settings_t) == 86, "RADArgos settings size mismatch");
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class RADGeminiSettings : public IDeviceSettings {
|
||||
class RADArgosSettings : public IDeviceSettings {
|
||||
public:
|
||||
RADGeminiSettings(Device* device) : IDeviceSettings(device, sizeof(radgemini_settings_t)) {}
|
||||
RADArgosSettings(Device* device) : IDeviceSettings(device, sizeof(radargos_settings_t)) {}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -50,4 +50,4 @@ public:
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
#endif // LIBICSNEO_RADGEMINISETTINGS_H
|
||||
#endif // LIBICSNEO_RADARGOSSETTINGS_H
|
||||
Reference in New Issue
Block a user