.Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Utilities.reasonableClockSelect

Function to calculate a reasonable prescaler for PWM or interrupts at a specific frequency

Interface

function reasonableClockSelect
  extends .Modelica.Icons.Function;
  import SIunits = Modelica.Units.SI;
  import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types;
  input SIunits.Frequency cpu, desired;
  input Real allowedError;
  input SIunits.Frequency prescalerConstants[Types.TimerPrescaler];
  output Types.TimerPrescaler prescaler;
end reasonableClockSelect;

Generated at 2025-04-03T18:24:42Z by OpenModelicaOpenModelica 1.24.5 using GenerateDoc.mos