b15f/firmware/pwm.h

21 lines
372 B
C
Raw Normal View History

2019-05-28 11:12:58 +02:00
#ifndef PWM_H
#define PWM_H
#include <avr/io.h>
#include <math.h>
2019-05-28 12:32:31 +02:00
class PWM
{
public:
void init(void) const volatile;
void setFrequency(uint32_t) const volatile;
void setValue(uint8_t) const volatile;
uint8_t getTop(void) const volatile;
private:
const static uint16_t PRESCALERS[];
const static uint8_t PRESCALER_COUNT;
};
2019-05-28 11:12:58 +02:00
#endif // PWM_H