mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: RAD-Comet and RAD-Comet 2: Replace all references to RAD-Comet with RAD-Comet2
This commit is contained in:
committed by
Kyle Schwarz
parent
0bf279c7b9
commit
49e578a657
@@ -121,7 +121,7 @@ enum class ChipID : icsneoc2_chip_id_t {
|
||||
VEM_01_8DW_ZCHIP = icsneoc2_chip_id_vem_01_8dw_zchip,
|
||||
RADGalaxy_FFG_Zynq = icsneoc2_chip_id_radgalaxy_ffg_zynq,
|
||||
RADMoon3_MCHIP = icsneoc2_chip_id_radmoon3_mchip,
|
||||
RADComet_ZYNQ = icsneoc2_chip_id_radcomet_zynq,
|
||||
RADComet2_ZYNQ = icsneoc2_chip_id_radcomet2_zynq,
|
||||
VEM_02_FR_ZCHIP = icsneoc2_chip_id_vem_02_fr_zchip,
|
||||
RADA2B_REVB_ZCHIP = icsneoc2_chip_id_rada2b_revb_zchip,
|
||||
RADGigastar_FFG_ZYNQ = icsneoc2_chip_id_radgigastar_ffg_zynq,
|
||||
|
||||
+5
-5
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "icsneo/device/device.h"
|
||||
#include "icsneo/device/devicetype.h"
|
||||
#include "icsneo/device/tree/radcomet/radcometsettings.h"
|
||||
#include "icsneo/device/tree/radcomet2/radcomet2settings.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
const std::vector<ChipInfo>& getChipInfo() const override {
|
||||
static std::vector<ChipInfo> chips = {
|
||||
{ChipID::RADComet_ZYNQ, true, "ZCHIP", "RADComet_SW_bin", 0, FirmwareType::Zip},
|
||||
{ChipID::RADComet2_ZYNQ, true, "ZCHIP", "RADComet_SW_bin", 0, FirmwareType::Zip},
|
||||
};
|
||||
return chips;
|
||||
}
|
||||
@@ -61,15 +61,15 @@ public:
|
||||
BootloaderPipeline getBootloader() override {
|
||||
return BootloaderPipeline()
|
||||
.add<EnterBootloaderPhase>()
|
||||
.add<FlashPhase>(ChipID::RADComet_ZYNQ, BootloaderCommunication::RAD)
|
||||
.add<EnterApplicationPhase>(ChipID::RADComet_ZYNQ)
|
||||
.add<FlashPhase>(ChipID::RADComet2_ZYNQ, BootloaderCommunication::RAD)
|
||||
.add<EnterApplicationPhase>(ChipID::RADComet2_ZYNQ)
|
||||
.add<WaitPhase>(std::chrono::milliseconds(3000))
|
||||
.add<ReconnectPhase>();
|
||||
}
|
||||
|
||||
protected:
|
||||
RADComet2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<RADCometSettings>(makeDriver);
|
||||
initialize<RADComet2Settings>(makeDriver);
|
||||
}
|
||||
|
||||
void setupPacketizer(Packetizer& packetizer) override {
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
#ifndef __RADCOMETSETTINGS_H_
|
||||
#define __RADCOMETSETTINGS_H_
|
||||
#ifndef __RADCOMET2SETTINGS_H_
|
||||
#define __RADCOMET2SETTINGS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "icsneo/device/idevicesettings.h"
|
||||
@@ -74,7 +74,7 @@ typedef struct {
|
||||
// 10T1S Extended settings
|
||||
ETHERNET10T1S_SETTINGS_EXT t1s1Ext;
|
||||
ETHERNET10T1S_SETTINGS_EXT t1s2Ext;
|
||||
} radcomet_settings_t;
|
||||
} radcomet2_settings_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@@ -83,15 +83,15 @@ typedef struct {
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
static_assert(sizeof(radcomet_settings_t) == 498, "RADComet settings size mismatch");
|
||||
static_assert(sizeof(radcomet2_settings_t) == 498, "RADComet2 settings size mismatch");
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class RADCometSettings : public IDeviceSettings {
|
||||
class RADComet2Settings : public IDeviceSettings {
|
||||
public:
|
||||
RADCometSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(radcomet_settings_t)) {}
|
||||
RADComet2Settings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(radcomet2_settings_t)) {}
|
||||
const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<radcomet_settings_t>();
|
||||
auto cfg = getStructurePointer<radcomet2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
switch(net.getNetID()) {
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
}
|
||||
}
|
||||
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<radcomet_settings_t>();
|
||||
auto cfg = getStructurePointer<radcomet2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
switch(net.getNetID()) {
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
|
||||
private:
|
||||
const ETHERNET10T1S_SETTINGS* getT1SSettingsFor(Network net) const {
|
||||
auto cfg = getStructurePointer<radcomet_settings_t>();
|
||||
auto cfg = getStructurePointer<radcomet2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -260,7 +260,7 @@ private:
|
||||
}
|
||||
|
||||
ETHERNET10T1S_SETTINGS* getMutableT1SSettingsFor(Network net) {
|
||||
auto cfg = getMutableStructurePointer<radcomet_settings_t>();
|
||||
auto cfg = getMutableStructurePointer<radcomet2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user