beta1
Fork of a4998 by
a4988.h
- Committer:
- glintligo
- Date:
- 2018-07-17
- Revision:
- 3:9e9f3cd7fff0
- Parent:
- 2:57c57267b1da
File content as of revision 3:9e9f3cd7fff0:
#ifndef __A4988_H #define __A4988_H #include "mbed.h" class Stepper { public: Stepper(PinName _en, PinName _stepPin, PinName _direction); void step(int dir, int frequency, volatile int _remain); void longrun(int dir, int frequency); void stoprun(); void enable(); void disable(); private: DigitalOut en; DigitalOut stepPin; DigitalOut direction; volatile int remain; Ticker step_ticker; void step_control(); void run_control(); }; #endif