wideband/firmware/main.cpp

27 lines
392 B
C++
Raw Normal View History

2020-09-19 02:49:20 -07:00
#include "ch.h"
#include "hal.h"
2020-09-19 15:44:10 -07:00
#include "pwm.h"
// 400khz / 1024 = 390hz PWM
2020-09-19 15:45:44 -07:00
// TODO: this is wired to an inverted output, what do?
2020-09-19 15:44:10 -07:00
Pwm heaterPwm(PWMD1, 1, 400000, 1024);
// 48MHz / 1024 = 46.8khz PWM
Pwm pumpDac(PWMD3, 1, 48000000, 1024);
2020-09-19 02:49:20 -07:00
/*
* Application entry point.
*/
int main(void) {
halInit();
chSysInit();
2020-09-19 15:44:10 -07:00
heaterPwm.Start();
pumpDac.Start();
2020-09-19 02:49:20 -07:00
while (true) {
}
}