FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Analog Comparator API. More...
Go to the source code of this file.
Classes | |
class | analog::AnalogComparator |
Handler of the Analog Comparator feature. More... | |
Namespaces | |
namespace | analog |
Defines all API to manipulate analog input/output. | |
Macros | |
#define | REGISTER_ANALOG_COMPARE_ISR_FUNCTION(CALLBACK) |
Register the necessary ISR (Interrupt Service Routine) that will be notified whenever an analog::AnalogComparator interrupt is triggered. More... | |
#define | REGISTER_ANALOG_COMPARE_ISR_METHOD(HANDLER, CALLBACK) |
Register the necessary ISR (Interrupt Service Routine) that will be notified whenever an analog::AnalogComparator interrupt is triggered. More... | |
#define | REGISTER_ANALOG_COMPARE_ISR_EMPTY() EMPTY_INTERRUPT(ANALOG_COMP_vect) |
Register an empty ISR (Interrupt Service Routine) for analog::AnalogComparator interrupts. More... | |
#define | DECL_ANALOG_COMPARE_ISR_HANDLERS_FRIEND friend void ::ANALOG_COMP_vect(void); |
This macro shall be used in a class containing a private callback method, registered by REGISTER_ANALOG_COMPARE_ISR_METHOD . More... | |
Enumerations | |
enum class | analog::ComparatorInterrupt : uint8_t { analog::NONE = bits::BV8(ACI) , analog::TOGGLE = bits::BV8(ACI, ACIE) , analog::FALLING_EDGE = bits::BV8(ACI, ACIE, ACIS1) , analog::RISING_EDGE = bits::BV8(ACI, ACIE, ACIS1, ACIS0) } |
Kind of change that will trigger an Analog Comparator Interrupt. More... | |
Analog Comparator API.
Definition in file analog_comparator.h.
#define REGISTER_ANALOG_COMPARE_ISR_FUNCTION | ( | CALLBACK | ) |
Register the necessary ISR (Interrupt Service Routine) that will be notified whenever an analog::AnalogComparator
interrupt is triggered.
CALLBACK | the function that will be called when the interrupt is triggered |
Definition at line 37 of file analog_comparator.h.
#define REGISTER_ANALOG_COMPARE_ISR_METHOD | ( | HANDLER, | |
CALLBACK | |||
) |
Register the necessary ISR (Interrupt Service Routine) that will be notified whenever an analog::AnalogComparator
interrupt is triggered.
HANDLER | the class holding the callback method |
CALLBACK | the method of HANDLER that will be called when the interrupt is triggered; this must be a proper PTMF (pointer to member function). |
Definition at line 53 of file analog_comparator.h.
#define REGISTER_ANALOG_COMPARE_ISR_EMPTY | ( | ) | EMPTY_INTERRUPT(ANALOG_COMP_vect) |
Register an empty ISR (Interrupt Service Routine) for analog::AnalogComparator
interrupts.
This can be useful if you just need to wake up the MCU from an external signal, but do not need to perform any sepcific stuff with a callback.
Definition at line 67 of file analog_comparator.h.
#define DECL_ANALOG_COMPARE_ISR_HANDLERS_FRIEND friend void ::ANALOG_COMP_vect(void); |
This macro shall be used in a class containing a private callback method, registered by REGISTER_ANALOG_COMPARE_ISR_METHOD
.
It declares the class where it is used as a friend of all necessary functions so that the private callback method can be called properly.
Definition at line 75 of file analog_comparator.h.