Microduino的cube小车。

Dependencies:   mbed-rtos mbed

Revision:
2:70ca3e685cca
Parent:
1:758ccab13947
Child:
3:e4ac7c1a14de
--- a/Microduino_Motor.h	Wed May 25 11:52:03 2016 +0000
+++ b/Microduino_Motor.h	Wed May 25 13:25:09 2016 +0000
@@ -19,7 +19,7 @@
 class Motor
 {
 public:
-    Motor(uint8_t _motor_pinA, uint8_t _motor_pinB);
+    Motor(PinName _motor_pinA, PinName _motor_pinB);
     void Fix(float _fix);
     void Driver(int16_t _motor_driver);
     void Free();
@@ -29,6 +29,9 @@
     uint8_t motorIndex;               // index into the channel data for this key
     float fix;
     int16_t _motor_vol;
+protected:
+    gpio_t gpioA;
+    gpio_t gpioB;
 };
 
 #endif
\ No newline at end of file