a
CCounter Class Reference
#include <encoder.hpp>
Public Member Functions | |
CCounter (PinName f_pin) | |
Constructor for the CCounter class. | |
void | reset () |
Counter reset method. | |
void | increment () |
Counter increment method. | |
int32_t | getCount () |
Get counts method. | |
Static Public Member Functions | |
static void | staticIncrement (void *obj) |
Get counts method. |
Detailed Description
CCounter class.
It is used for counting encoder steps.
Definition at line 24 of file encoder.hpp.
Constructor & Destructor Documentation
CCounter | ( | PinName | f_pin ) |
Constructor for the CCounter class.
Constructor method
- Parameters:
-
f_pin digital pin connected to encoder output
Definition at line 20 of file encoder.cpp.
Member Function Documentation
int32_t getCount | ( | ) |
void increment | ( | ) |
Counter increment method.
Definition at line 42 of file encoder.cpp.
void reset | ( | ) |
Counter reset method.
Definition at line 33 of file encoder.cpp.
void staticIncrement | ( | void * | obj ) | [static] |
Get counts method.
Method attaches the increment method to an object.
- Parameters:
-
obj object
Definition at line 62 of file encoder.cpp.
Generated on Tue Jul 12 2022 22:40:51 by 1.7.2