add callback support
This commit is contained in:
1 parent
337b683e9f
commit
23dca4bc75
6 files changed
+155
-10
No files matched your search
@@ -41,7 +41,7 @@
|
||||
class HwRotaryEncoder
|
||||
{
|
||||
public:
|
||||
typedef void (*callback_t) (int32_t step);
|
||||
typedef void (*callback_t) (int step);
|
||||
|
||||
HwRotaryEncoder(void)
|
||||
{
|
||||
@@ -68,6 +68,9 @@ class HwRotaryEncoder
|
||||
|
||||
void setCallback(callback_t fp);
|
||||
|
||||
// Internal API
|
||||
void _irq_handler(void);
|
||||
|
||||
private:
|
||||
int8_t _pina, _pinb;
|
||||
int8_t _pinled;
|
||||
|
||||
Reference in new issue
Block a user