Tidying
This commit is contained in:
@@ -57,9 +57,11 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen
|
||||
this->eearAddressLow = static_cast<std::uint8_t>(eearlDescriptor.startAddress);
|
||||
|
||||
/*
|
||||
* Some debugWire targets only have a single-byte `EEARL` register. In the absence of an `EEARH` register,
|
||||
* and if there is no high byte in the `EEARL` register, the `eearAddressHigh` parameter should be equal
|
||||
* to the `eearAddressLow` parameter, as stated in the "EDBG-based Tools Protocols" document.
|
||||
* Some debugWire targets only have a single-byte `EEARL` register.
|
||||
*
|
||||
* In the absence of an `EEARH` register, and if there is no high byte in the `EEARL` register, the
|
||||
* `eearAddressHigh` parameter should be equal to the `eearAddressLow` parameter, as stated in the
|
||||
* "EDBG-based Tools Protocols" document.
|
||||
*/
|
||||
const auto eearhDescriptor = eepromRegisterGroupDescriptor.tryGetRegisterDescriptor("eearh");
|
||||
this->eearAddressHigh = static_cast<std::uint8_t>(
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, commandType(static_cast<CommandType>((registerValue >> 24) & 0xFF))
|
||||
{}
|
||||
|
||||
constexpr RegisterValue value() const {
|
||||
[[nodiscard]] constexpr RegisterValue value() const {
|
||||
assert(this->control <= 0x00FFFFFF);
|
||||
|
||||
return RegisterValue{0}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, programBufferSize(static_cast<std::uint8_t>((registerValue >> 24) & 0x1F))
|
||||
{}
|
||||
|
||||
constexpr RegisterValue value() const {
|
||||
[[nodiscard]] constexpr RegisterValue value() const {
|
||||
return RegisterValue{0}
|
||||
| static_cast<RegisterValue>(this->dataCount)
|
||||
| static_cast<RegisterValue>(this->commandError) << 8
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, haltRequest(static_cast<bool>(registerValue & static_cast<std::uint32_t>(0x01 << 31)))
|
||||
{}
|
||||
|
||||
constexpr RegisterValue value() const {
|
||||
[[nodiscard]] constexpr RegisterValue value() const {
|
||||
assert(this->selectedHartIndex <= 0xFFFFF);
|
||||
|
||||
return RegisterValue{0}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, virtualAddress(static_cast<bool>(controlValue & (0x01 << 23)))
|
||||
{}
|
||||
|
||||
constexpr std::uint32_t value() const {
|
||||
[[nodiscard]] constexpr std::uint32_t value() const {
|
||||
return std::uint32_t{0}
|
||||
| static_cast<std::uint32_t>(this->write) << 16
|
||||
| static_cast<std::uint32_t>(this->postIncrement) << 19
|
||||
|
||||
@@ -22,8 +22,6 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
bool postIncrement:1 = false;
|
||||
RegisterSize size:3 = RegisterSize::SIZE_32;
|
||||
|
||||
RegisterAccessControlField() = default;
|
||||
|
||||
RegisterAccessControlField(
|
||||
RegisterNumber registerNumber,
|
||||
bool write,
|
||||
@@ -49,7 +47,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, size(static_cast<RegisterSize>((controlValue >> 20) & 0x07))
|
||||
{}
|
||||
|
||||
constexpr std::uint32_t value() const {
|
||||
[[nodiscard]] constexpr std::uint32_t value() const {
|
||||
return std::uint32_t{0}
|
||||
| static_cast<std::uint32_t>(this->registerNumber)
|
||||
| static_cast<std::uint32_t>(this->write) << 16
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Targets::RiscV::DebugModule::Registers
|
||||
, ndmResetPending(static_cast<bool>(registerValue & (0x01 << 24)))
|
||||
{}
|
||||
|
||||
constexpr RegisterValue value() const {
|
||||
[[nodiscard]] constexpr RegisterValue value() const {
|
||||
return RegisterValue{0}
|
||||
| static_cast<RegisterValue>(this->version)
|
||||
| static_cast<RegisterValue>(this->validConfigStructurePointer) << 4
|
||||
|
||||
Reference in New Issue
Block a user