diff --git a/src/inverter.c b/src/inverter.c index e07df02..48ceaa3 100644 --- a/src/inverter.c +++ b/src/inverter.c @@ -1,11 +1,13 @@ #include #include #include +#include #include "uart.h" #include "timer.h" #include "commands.h" #include "pins.h" +#include "pwm.h" int main() { @@ -14,12 +16,22 @@ int main() /* With this MCU frequency (8MHz), 12 is a baudrate of 38.4k baud */ uart_init(12); - initPwmTimer1(); + pwm_init(); + + timer_initT1(); + + + DDRB |= (1 << DDB5); + DDRD |= (1 << DDD7); + + printf("Up and running.\n\r"); while (1) { /* We handle terminated commands here. Outside of the context of the UART receive interrupt. */ cmd_handle(cmd_getcommand()); + + pwm_worker(); } return 0;