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
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#include "DebugTranslatorConfig.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace DebugToolDrivers::Protocols::RiscVDebugSpec
|
||||
{
|
||||
DebugTranslatorConfig::DebugTranslatorConfig(const YAML::Node& configNode) {
|
||||
if (configNode["targetResponseTimeout"]) {
|
||||
this->targetResponseTimeout = std::chrono::microseconds{
|
||||
configNode["targetResponseTimeout"].as<int>(this->targetResponseTimeout.count())
|
||||
configNode["targetResponseTimeout"].as<std::int64_t>(this->targetResponseTimeout.count())
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user