LV8548 Motor Driver Stepper Motor Dc MOtor

Dependents:   LV8548_ON_MD_Modlle_kit_DCMtr_And_STEPMtr

Files at this revision

API Documentation at this revision

Comitter:
yamasho
Date:
Mon Nov 19 01:52:22 2018 +0000
Parent:
1:e60c7c42e6fc
Commit message:
bug Fix;

Changed in this revision

LV8548.cpp Show annotated file Show diff for this revision Revisions of this file
LV8548.h Show annotated file Show diff for this revision Revisions of this file
--- a/LV8548.cpp	Sat Nov 17 05:05:13 2018 +0000
+++ b/LV8548.cpp	Mon Nov 19 01:52:22 2018 +0000
@@ -8,6 +8,7 @@
 #include "LV8548.h"
 #include "mbed.h"
 
+#define _DEBUG_     (0)
 
 #define     COIL_A      (0X1)
 #define     COIL_B      (0X2)
@@ -60,7 +61,7 @@
                                   (COIL_A | COIL_D)};
 
 #endif                             
-#define _DEBUG_     (0)
+
 
 
 LV8548::LV8548(PinName in1, PinName in2, PinName in3, PinName in4, DriverType drivertype,uint16_t baseus):
@@ -96,7 +97,6 @@
 void LV8548::SetDcMotorStop(uint8_t ch)
 {
     if( _Drivertype != DCMOTOR ) return;
-
     if(ch == MOTOR_A)
     {
       _in1.write(0.0f);
--- a/LV8548.h	Sat Nov 17 05:05:13 2018 +0000
+++ b/LV8548.h	Mon Nov 19 01:52:22 2018 +0000
@@ -13,7 +13,7 @@
 #define MAXCH   (2)
 
 #define STEPMAX_FREQ (4800)
-#define USE_PWM_PORT       (FALSE)
+#define USE_PWM_PORT       (1) // if use stepper then (0)
 
 /** Motor Use  */
  enum DriverType {