dsaf
Fork of a4998 by
a4988.h
- Committer:
- brainliang
- Date:
- 2018-05-08
- Revision:
- 1:ab0f997c2d9c
- Parent:
- 0:173936452e07
File content as of revision 1:ab0f997c2d9c:
#ifndef __A4988_H #define __A4988_H #endif #include "mbed.h" //class Stepper; //typedef void (Stepper::*pClassFun)(); class Stepper { public: Stepper(PinName _en,PinName _stepPin, PinName _direction); void step(int dir, int frequency ,volatile int _remain); //方向,频率,步数3个参数 void enable(); void disable(); private: DigitalOut en; DigitalOut stepPin; DigitalOut direction; volatile int remain; Ticker step_ticker; void step_control(); // pClassFun fun; };