This commit is contained in:
Matthew Kennedy 2022-12-01 15:51:01 -08:00
parent 2737e710d4
commit fa00aa0ad4
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
#include "hal.h"
// 48MHz / 1024 = 46.8khz PWM
PWMConfig pumpDacConfig = {
static const PWMConfig pumpDacConfig = {
48'000'000,
1024,
nullptr,

View File

@ -31,7 +31,7 @@ void Pwm::Start()
Start(config);
}
void Pwm::Start(PWMConfig& config)
void Pwm::Start(const PWMConfig& config)
{
m_counterFrequency = config.frequency;
m_counterPeriod = config.period;

View File

@ -13,7 +13,7 @@ public:
Pwm(PWMDriver& driver);
void Start();
void Start(PWMConfig& config);
void Start(const PWMConfig& config);
void SetDuty(int channel, float duty);
float GetLastDuty(int channel);