100 void SetAcsr(
unsigned char val);
Basic AVR device, contains the core functionality.
HWIrqSystem * irqSystem
connection to IRQ controller
bool useBG
has ADBG register bit and can switch In0 to bandgap ref
Pin * v_cc
get access to voltage supply level
unsigned char get_from_client(const IOSpecialReg *reg, unsigned char v)
BasicTimerUnit * timerB
connection to timerB for input capture event. NULL, if not available
float GetIn0(void)
Get analog value for comparator input 0.
Pin class, handles input and output to external parts.
bool enabled
analog comparator is enabled
float GetIn1(void)
Get analog value for comparator input 1.
IOReg< HWAcomp > acsr_reg
ACSR IO register.
void SetAcsr(unsigned char val)
Set method for ACSR register.
unsigned char acsr
ACSR register value.
Interface class to connect hardware units to control registers.
void PinStateHasChanged(Pin *)
Get informed about input pin change.
void ClearIrqFlag(unsigned int vec)
Reflect irq processing, reset interrupt source.
BasicTimerUnit * timerA
connection to timerA for input capture event. NULL, if not available
void Reset()
Reset the unit.
unsigned char GetAcsr()
Get method for ACSR register.
Build a register for TraceValue's.
PinAtPort pinAin1
port pin AIN1
bool acme_sfior
ACME flag in SFIOR register is set.
unsigned int irqVec
stores the IRQ vector number
bool GetACO(void)
Return last state of analog comparator (assume, that this is correct, if unit is disabled) ...
HWAd * ad
connection to ADC for analog input mux. NULL, if not available
unsigned char set_from_reg(const IOSpecialReg *reg, unsigned char nv)
Pin * v_bg
get access to bandgap reference
bool isSetACME(void)
Check, if ACME flag is set (from ADC or SFIOR register)
IOSpecialReg * sfior
connection to SFIOR register, if necessary. NULL, if not used
HWAcomp(AvrDevice *core, HWIrqSystem *irqsys, PinAtPort ain0, PinAtPort ain1, unsigned int irqVec, HWAd *_ad, BasicTimerUnit *_timerA, IOSpecialReg *_sfior=NULL, BasicTimerUnit *_timerB=NULL, bool _useBG=true)
constructor to instantiate a analog comparator peripheral
void NotifySignalChanged(void)
PinAtPort pinAin0
port pin AIN0
Analog comparator peripheral.