pwm in MCU added

This commit is contained in:
Tristan Krause 2019-05-28 11:12:58 +02:00
parent 5f48849c4e
commit 1f53117577
7 changed files with 48 additions and 40 deletions

13
firmware/pwm.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef PWM_H
#define PWM_H
#include <avr/io.h>
#include <math.h>
const uint16_t PWM_PRESCALERS[] = {0, 1, 8, 64, 256, 1024};
const uint8_t PWM_PRESCALER_COUNT = sizeof(PWM_PRESCALERS) / sizeof(uint16_t);
void pwmSetFrequency(uint32_t);
void pwmSetValue(uint8_t);
#endif // PWM_H