Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of stepper by
a4988.h
00001 #ifndef __A4988_H 00002 #define __A4988_H 00003 #endif 00004 00005 #include "mbed.h" 00006 //class Stepper; 00007 //typedef void (Stepper::*pClassFun)(); 00008 class Stepper 00009 { 00010 public: 00011 Stepper(PinName _en = PB_9,PinName _stepPin = PB_0, PinName _direction = PB_7 ); 00012 void step(int dir, long long int frequency ,volatile long long int _remain); 00013 void enable(); 00014 void disable(); 00015 private: 00016 DigitalOut en; 00017 DigitalOut stepPin; 00018 DigitalOut direction; 00019 volatile long long int remain; 00020 Ticker step_ticker; 00021 void step_control(); 00022 // pClassFun fun; 00023 };
Generated on Tue Jul 19 2022 10:05:46 by
