COSA
An Object-Oriented Platform for Arduino Programming
AnalogComparator.cpp
Go to the documentation of this file.
1 
21 #include "Cosa/AnalogComparator.hh"
22 
24 
25 void
27 {
28  Event::push(Event::CHANGE_TYPE, this, arg);
29 }
30 
32 {
33  if (UNLIKELY(AnalogComparator::s_comparator == NULL)) return;
34  AnalogComparator::s_comparator->on_interrupt();
35 }
#define NULL
Definition: Types.h:101
ISR(ANALOG_COMP_vect)
virtual void on_interrupt(uint16_t arg=0)
static AnalogComparator * s_comparator
Current comparator.
friend void ANALOG_COMP_vect(void)
#define UNLIKELY(x)
Definition: Types.h:153
static bool push(uint8_t type, Handler *target, uint16_t value=0)
Definition: Event.hh:180