[hal] Add frequency support to DutyCycle (#8076)

This commit is contained in:
Thad House
2025-07-14 23:46:17 -07:00
committed by GitHub
parent ef24c1df97
commit 3497a7d09f
31 changed files with 153 additions and 355 deletions

View File

@@ -187,7 +187,7 @@ void DIOsSimModel::Update() {
auto& model = m_dutyCycleModels[i];
if (HALSIM_GetDutyCycleInitialized(i)) {
if (!model) {
int channel = HALSIM_GetDutyCycleDigitalChannel(i);
int channel = i;
if (channel >= 0 && channel < numDIO && m_dioModels[channel]) {
model = std::make_unique<DutyCycleSimModel>(i);
m_dioModels[channel]->SetDutyCycle(model.get());