ddd
Fork of stepper by
Diff: a4988.h
- Revision:
- 1:88f743f3e7a7
- Parent:
- 0:173936452e07
diff -r 173936452e07 -r 88f743f3e7a7 a4988.h --- a/a4988.h Wed May 02 10:48:23 2018 +0000 +++ b/a4988.h Fri May 11 06:05:21 2018 +0000 @@ -8,15 +8,15 @@ class Stepper { public: - Stepper(PinName _en,PinName _stepPin, PinName _direction); - void step(int dir, int frequency ,volatile int _remain); + Stepper(PinName _en = PB_9,PinName _stepPin = PB_0, PinName _direction = PB_7 ); + void step(int dir, long long int frequency ,volatile long long int _remain); void enable(); void disable(); private: DigitalOut en; DigitalOut stepPin; DigitalOut direction; - volatile int remain; + volatile long long int remain; Ticker step_ticker; void step_control(); // pClassFun fun;