Initial commit
This commit is contained in:
27
src/platform/f7-disco-gcc/board/interface/buttonirq.h
Normal file
27
src/platform/f7-disco-gcc/board/interface/buttonirq.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef INTERFACE_BUTTONIRQ_H
|
||||
#define INTERFACE_BUTTONIRQ_H
|
||||
|
||||
namespace interface {
|
||||
|
||||
/**
|
||||
* @brief Interface needed by the Interrupt Service Routine (ISR).
|
||||
*
|
||||
* This interface is needed by the ISR which reacts on button
|
||||
* changes (level changes on GPIOs).
|
||||
*
|
||||
* Every time a level change on the buttons GPIOs is detected,
|
||||
* the ISR calls this method.
|
||||
*/
|
||||
class ButtonIrq
|
||||
{
|
||||
protected:
|
||||
virtual ~ButtonIrq() {}
|
||||
|
||||
virtual void onIrq() = 0; ///< @brief Called by the ISR.
|
||||
|
||||
protected:
|
||||
ButtonIrq() {} ///< Not allowing to instantiate object of interface.
|
||||
};
|
||||
|
||||
} // namespace interface
|
||||
#endif // INTERFACE_BUTTONIRQ_H
|
Reference in New Issue
Block a user