2024-10-06 17:54:08 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
#include "src/DebugToolDrivers/Protocols/RiscVDebugSpec/TriggerModule/TriggerModule.hpp"
|
|
|
|
|
|
|
|
|
|
namespace DebugToolDrivers::Protocols::RiscVDebugSpec::TriggerModule::Registers
|
|
|
|
|
{
|
2024-10-16 21:22:16 +01:00
|
|
|
/**
|
|
|
|
|
* TODO: Given the single, full width bit field, is this struct really necessary? Review.
|
|
|
|
|
*/
|
2024-10-06 17:54:08 +01:00
|
|
|
struct TriggerSelect
|
|
|
|
|
{
|
|
|
|
|
TriggerIndex index;
|
|
|
|
|
|
|
|
|
|
constexpr explicit TriggerSelect(TriggerIndex index)
|
|
|
|
|
: index(index)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
[[nodiscard]] constexpr RegisterValue value() const {
|
|
|
|
|
return static_cast<RegisterValue>(this->index);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|