loliruyu

Revision:
0:d7f40a9a9020
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vnh_2sp30.h	Wed Mar 28 16:18:22 2018 +0000
@@ -0,0 +1,31 @@
+#include <vnh_2sp30_conf.h>
+#include <mbed.h>
+
+#define FORWARD 0x1
+#define BACKWARD 0x0
+
+
+class vnh_2sp30{
+    
+    private:
+    int dir;
+    float vel;
+    float acc;
+    float cur;
+    
+    digitalOut ENA;
+    digitalOut ENB;
+    PwmOut PWM;
+    analogIn CS;
+    Ticker t;
+    
+    void update();
+    
+    public:
+    vnh_2sp30();
+    ~vnh_2sp30();
+    set_vel(float vel);
+    set_dir(int dir);
+    set_acc(float acc);
+    
+    }
\ No newline at end of file