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
|
||||
@@ -280,7 +280,7 @@ typedef unsigned __int64 uint64_t;
|
||||
#define NEODEVICE_GIGASTAR2 (0x00000029)
|
||||
#define NEODEVICE_FIRE3_T1S_LIN (0x0000002A)
|
||||
#define NEODEVICE_FIRE3_T1S_SENT (0x0000002B)
|
||||
#define NEODEVICE_RADGEMINI (0x0000002C)
|
||||
#define NEODEVICE_RADARGOS (0x0000002C)
|
||||
|
||||
#define NEODEVICE_RED_DEPRECATED (0x00000040)
|
||||
#define NEODEVICE_ECU_DEPRECATED (0x00000080)
|
||||
@@ -975,7 +975,7 @@ typedef union _stChipVersions
|
||||
{
|
||||
uint8_t mchip_major;
|
||||
uint8_t mchip_minor;
|
||||
} radgemini_versions;
|
||||
} radargos_versions;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -2794,7 +2794,7 @@ typedef struct _SRADMoon3Settings
|
||||
|
||||
#define SRADMoon3Settings_SIZE 68
|
||||
|
||||
typedef struct _SRADGeminiSettings
|
||||
typedef struct _SRADArgosSettings
|
||||
{
|
||||
uint16_t perf_en; // 2
|
||||
|
||||
@@ -2815,9 +2815,9 @@ typedef struct _SRADGeminiSettings
|
||||
uint16_t enableLatencyTest : 1;
|
||||
uint16_t reserved : 15;
|
||||
} flags; // 2
|
||||
} SRADGeminiSettings;
|
||||
} SRADArgosSettings;
|
||||
|
||||
#define SRADGeminiSettings_SIZE 86
|
||||
#define SRADArgosSettings_SIZE 86
|
||||
|
||||
typedef struct _SRADGigastarSettings
|
||||
{
|
||||
@@ -4450,7 +4450,7 @@ typedef struct _GLOBAL_SETTINGS
|
||||
SRADEpsilonSettings epsilon;
|
||||
SRADBMSSettings rad_bms;
|
||||
SRADMoon3Settings radmoon3;
|
||||
SRADGeminiSettings radgemini;
|
||||
SRADArgosSettings radargos;
|
||||
SRADCometSettings radcomet;
|
||||
SRADComet3Settings radcomet3;
|
||||
SRADGigastar2Settings radgigastar2;
|
||||
@@ -4509,7 +4509,7 @@ typedef enum _EDeviceSettingsType
|
||||
DeviceRADGalaxy2SettingsType,
|
||||
DeviceRADGigastar2SettingsType,
|
||||
DeviceRADMoonT1SSettingsType,
|
||||
DeviceRADGeminiSettingsType,
|
||||
DeviceRADArgosSettingsType,
|
||||
DeviceFire3T1sLinSettingsType,
|
||||
// add new settings type here
|
||||
// Also add to map inside cicsneoVI::Init()
|
||||
@@ -4545,7 +4545,7 @@ typedef struct _SDeviceSettings
|
||||
SRADEpsilonSettings epsilon;
|
||||
SRADBMSSettings rad_bms;
|
||||
SRADMoon3Settings radmoon3;
|
||||
SRADGeminiSettings radgemini;
|
||||
SRADArgosSettings radargos;
|
||||
SFire3FlexraySettings fire3Flexray;
|
||||
SFire3T1sLinSettings fire3t1slin;
|
||||
SRADCometSettings radcomet;
|
||||
@@ -5430,7 +5430,7 @@ CHECK_STRUCT_SIZE(SRADEpsilonSettings);
|
||||
CHECK_STRUCT_SIZE(RAD_GPTP_SETTINGS);
|
||||
CHECK_STRUCT_SIZE(SRADBMSSettings);
|
||||
CHECK_STRUCT_SIZE(SRADMoon3Settings);
|
||||
CHECK_STRUCT_SIZE(SRADGeminiSettings);
|
||||
CHECK_STRUCT_SIZE(SRADArgosSettings);
|
||||
CHECK_STRUCT_SIZE(SFire3FlexraySettings);
|
||||
CHECK_STRUCT_SIZE(SFire3T1sLinSettings);
|
||||
CHECK_STRUCT_SIZE(CANHubSettings);
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef enum _icsneoc2_devicetype_t {
|
||||
icsneoc2_devicetype_rad_gigastar2 = 0x00000029,
|
||||
icsneoc2_devicetype_fire3_t1s_lin = 0x0000002a,
|
||||
icsneoc2_devicetype_fire3_t1s_sent = 0x0000002b,
|
||||
icsneoc2_devicetype_rad_gemini = 0x0000002c,
|
||||
icsneoc2_devicetype_rad_argos = 0x0000002c,
|
||||
icsneoc2_devicetype_red = 0x00000040,
|
||||
icsneoc2_devicetype_ecu = 0x00000080,
|
||||
icsneoc2_devicetype_ievb = 0x00000100,
|
||||
@@ -678,7 +678,7 @@ typedef enum _icsneoc2_chip_id_t {
|
||||
icsneoc2_chip_id_radmoont1s_zchip = 130,
|
||||
icsneoc2_chip_id_radgigastar2_zynq = 131,
|
||||
icsneoc2_chip_id_sfpmodule_ent11100_mchip = 132,
|
||||
icsneoc2_chip_id_radgemini_mchip = 135,
|
||||
icsneoc2_chip_id_radargos_mchip = 135,
|
||||
icsneoc2_chip_id_maxsize, // Must be last entry, Don't use as a chip ID.
|
||||
|
||||
// Used for unknown or invalid chip ID
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
||||
#include "icsneo/device/tree/radmoon2/radmoon2zl.h"
|
||||
#include "icsneo/device/tree/radmoon3/radmoon3.h"
|
||||
#include "icsneo/device/tree/radgemini/radgemini.h"
|
||||
#include "icsneo/device/tree/radargos/radargos.h"
|
||||
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
||||
#include "icsneo/device/tree/radpluto/radpluto.h"
|
||||
#include "icsneo/device/tree/radstar2/radstar2.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
||||
#include "icsneo/device/tree/radmoon2/radmoon2zl.h"
|
||||
#include "icsneo/device/tree/radmoon3/radmoon3.h"
|
||||
#include "icsneo/device/tree/radgemini/radgemini.h"
|
||||
#include "icsneo/device/tree/radargos/radargos.h"
|
||||
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
||||
#include "icsneo/device/tree/radpluto/radpluto.h"
|
||||
#include "icsneo/device/tree/radstar2/radstar2.h"
|
||||
|
||||
Reference in New Issue
Block a user