inital commit

This commit is contained in:
2019-05-06 19:06:49 +02:00
commit 51a5e6fc28
10 changed files with 489 additions and 0 deletions

22
comperator.cpp Normal file
View File

@ -0,0 +1,22 @@
#include "comperator.h"
Comperator::Comperator()
{
if constexpr(INTERNAL_REFERANCE) ACSR = 0b01000001;
else ACSR = 0b00000011;
}
void Comperator::on()
{
ACSR &= 0b01111111;
}
void Comperator::off()
{
ACSR |= 0b10000000;
}
bool Comperator::compare()
{
return ACSR & 0b00100000;
}