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.
Dependents: AresCDFMainCode_capteur_US AresCDFMainCode_us2 AresCDFMainCode
Diff: DRV8825.h
- Revision:
- 0:4bf91783cb4d
- Child:
- 1:680064646da2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DRV8825.h Fri Jun 12 17:24:35 2020 +0000
@@ -0,0 +1,32 @@
+#ifndef DRV8825_H
+#define DRV8825_H
+
+#include "mbed.h"
+#include "platform/mbed_thread.h"
+#include "FastPWM.h"
+
+#define FORWARD 1
+#define BACKWARD 0
+
+#define START 0
+#define STOP 1
+
+class DRV8825{
+ public:
+ DRV8825();
+ DRV8825(PinName pinEN, PinName pinDIR, PinName pinStep);
+
+ void setDir(uint8_t dir);
+ void setEnable(uint8_t en);
+ void move(unsigned int Frequency);
+
+
+ private:
+ DigitalOut* m_en;
+ DigitalOut* m_dir;
+ FastPWM* m_step;
+
+};
+
+
+#endif //DRV8825_H