COSA
An Object-Oriented Platform for Arduino Programming
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
AnalogComparator.cpp
Go to the documentation of this file.
1
21
#include "
Cosa/AnalogComparator.hh
"
22
23
AnalogComparator
*
AnalogComparator::s_comparator
=
NULL
;
24
25
void
26
AnalogComparator::on_interrupt
(uint16_t arg)
27
{
28
Event::push
(
Event::CHANGE_TYPE
,
this
, arg);
29
}
30
31
ISR
(
ANALOG_COMP_vect
)
32
{
33
if
(
UNLIKELY
(AnalogComparator::s_comparator ==
NULL
))
return
;
34
AnalogComparator::s_comparator->
on_interrupt
();
35
}
NULL
#define NULL
Definition:
Types.h:101
ISR
ISR(ANALOG_COMP_vect)
Definition:
AnalogComparator.cpp:31
AnalogComparator.hh
Event::CHANGE_TYPE
Definition:
Event.hh:58
AnalogComparator::on_interrupt
virtual void on_interrupt(uint16_t arg=0)
Definition:
AnalogComparator.cpp:26
AnalogComparator
Definition:
AnalogComparator.hh:32
AnalogComparator::s_comparator
static AnalogComparator * s_comparator
Current comparator.
Definition:
AnalogComparator.hh:99
AnalogComparator::ANALOG_COMP_vect
friend void ANALOG_COMP_vect(void)
UNLIKELY
#define UNLIKELY(x)
Definition:
Types.h:153
Event::push
static bool push(uint8_t type, Handler *target, uint16_t value=0)
Definition:
Event.hh:180
cores
cosa
Cosa
AnalogComparator.cpp
Generated on Thu Aug 31 2017 17:02:02 for COSA by
1.8.11