Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: ap1017ctrl.h
- Revision:
- 26:4e436b0cbaf8
- Parent:
- 25:76c11ab5060e
- Child:
- 36:aafd15b3291b
diff -r 76c11ab5060e -r 4e436b0cbaf8 ap1017ctrl.h --- a/ap1017ctrl.h Fri Apr 14 20:13:38 2017 +0000 +++ b/ap1017ctrl.h Mon Apr 17 22:58:39 2017 +0000 @@ -7,6 +7,9 @@ #define SubIdAp1017 0x01 +/** + * Class for handling commands issued to the AP1017 motor driver. + */ class Ap1017Ctrl : public AkmSensor { public: @@ -84,6 +87,11 @@ * @return Sensor name as a char array. */ virtual char* getSensorName(); + + /** + * Interrupt handler occurring at regular intervals. + */ + void timerCallback(); private: bool event; @@ -92,6 +100,8 @@ char* sensorName; AP1017* ap1017; + Ticker ticker; // Timer interrupt handler object + float interval; // Timer interrupt interval };