pal heater device

This commit is contained in:
Matthew Kennedy 2021-12-27 20:42:57 -08:00
parent 41105cd29f
commit 8cb60d5b18
4 changed files with 9 additions and 1 deletions

View File

@ -8,3 +8,6 @@
#define NERNST_ESR_DRIVER_PORT GPIOB
#define NERNST_ESR_DRIVER_PIN 7
#define HEATER_PWM_DEVICE PWMD1
#define HEATER_PWM_CHANNEL 0

View File

@ -10,3 +10,6 @@
#define NERNST_ESR_DRIVER_PORT GPIOB
#define NERNST_ESR_DRIVER_PIN 7
#define HEATER_PWM_DEVICE PWMD1
#define HEATER_PWM_CHANNEL 0

View File

@ -10,7 +10,7 @@
#include "pid.h"
// 400khz / 1024 = 390hz PWM
Pwm heaterPwm(PWMD1, 0, 400'000, 1024);
Pwm heaterPwm(HEATER_PWM_DEVICE, HEATER_PWM_CHANNEL, 400'000, 1024);
enum class HeaterState
{

View File

@ -1,5 +1,7 @@
#pragma once
#include "io_pins.h"
// Fundamental board constants
#define VCC_VOLTS (3.3f)
#define HALF_VCC (VCC_VOLTS / 2)