Files
BloomPatched/src/DebugToolDrivers/Protocols/RiscVDebugSpec/TriggerModule/Registers/TriggerSelect.hpp
Nav 348ec19c1b Tidying RISC-V register structs
- Removed unnecessary bit fields
- Added default values to members
- Removed all user-defined constructors to make the structs aggregate, replacing the from-value constructor with a `fromValue()` status member function.
- Made use of designated initialisation
- Changed unscoped enums to scoped
- Other small bits of tidying
2024-10-16 21:22:16 +01:00

25 lines
617 B
C++

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