Driver for two motors library

Revision:
0:eafb70ae80f7
Child:
1:e417951c16d7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Driver.h	Tue Jul 28 05:46:24 2020 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+class driver{
+    
+    public:  
+        driver(PinName M1A, PinName M1B, PinName M2A, PinName M2B);
+        void setPeriod_ms(int32_t);
+        void forward(float, float);
+        void backward(float, float);
+        void right(float, float);
+        void left(float, float);
+        void neutral();
+        
+    protected:
+        PwmOut M1A;
+        PwmOut M1B;
+        PwmOut M2A;
+        PwmOut M2B;
+        float _dutyCycle1;
+        float _dutyCycle2;
+        int32_t _period;
+};
\ No newline at end of file