b15f/firmware/adu.h

31 lines
556 B
C
Raw Normal View History

2019-03-25 14:40:36 +00:00
#ifndef ADC_H
#define ADC_H
#include <avr/io.h>
class ADU
{
public:
2019-04-03 12:09:58 +00:00
/**
* Konfiguriert die ADC Register
*/
2019-04-03 06:40:14 +00:00
void init(void) volatile;
2019-04-03 12:09:58 +00:00
/**
* Behandlungsroutine für ADC interrupt
*/
void handleConversionComplete(void) volatile;
/**
* Startet eine AD Konvertierung, wartet auf Abschluss und liefert Ergebnis
* \param channel Auswahl des ADC Kanals (0-7), Kanal 6 und 7 sind Poti R36 und R37
*/
uint16_t getValue(uint8_t channel) volatile;
private:
volatile bool active = false;
2019-03-25 14:40:36 +00:00
};
#endif // ADC_H