dsaf

Dependents:   Ex_3Dprinter_copy

Fork of a4998 by Keegan Hu

a4988.h

Committer:
glintligo
Date:
2018-05-02
Revision:
0:173936452e07
Child:
1:ab0f997c2d9c

File content as of revision 0:173936452e07:

#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);
    void enable();
    void disable();
private:
    DigitalOut en;
    DigitalOut stepPin;
    DigitalOut direction;
    volatile int remain;
    Ticker step_ticker;
    void step_control();
   // pClassFun fun;
};