Don't show parameter view if peripheral has no parameters
MODIFY
src/io/iomanager.cpp
src/io/iomanager.cpp
@@ -124,7 +124,10 @@ std::vector<std::pair<QString, uint32_t>> IOManager::assemblerSymbolsForPeriph(I
for (const auto& reg : peripheral->registers()) {
if (reg.exported) {
- symbols.push_back({periphName + "_" + cName(reg.name), reg.address + periphInfo.startAddr});
+ const QString base = periphName + "_" + cName(reg.name);
+ const QString offset = base + "_OFFSET";
+ symbols.push_back({offset, reg.address});
+ symbols.push_back({base, reg.address + periphInfo.startAddr});
}
}

MODIFY
src/ioperipheraltab.cpp
src/ioperipheraltab.cpp
@@ -18,10 +18,14 @@ IOPeripheralTab::IOPeripheralTab(QWidget* parent, IOBase* peripheral)
m_ui->registerMapView->horizontalHeader()->setStretchLastSection(true);
m_ui->registerMapView->resizeColumnsToContents();
+ if (peripheral->parameters().size() == 0) {
+ m_ui->parameterGroupBox->hide();
+ } else {
m_ui->parameterView->setModel(new PeriphParamModel(peripheral, this));
m_ui->parameterView->horizontalHeader()->setStretchLastSection(true);
m_ui->parameterView->resizeColumnsToContents();
m_ui->parameterView->setItemDelegateForColumn(PeriphParamModel::Value, new PeriphParamDelegate(this));
+ }
updateExportsInfo();
}

MODIFY
src/ioperipheraltab.ui
src/ioperipheraltab.ui
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_2">
+ <widget class="QGroupBox" name="parameterGroupBox">
<property name="title">
<string>Parameters</string>
</property>

Don't show parameter view if peripheral has no parameters