p kj
/
MKS22-CubeFine
LPC824
Fork of CubeFine by
Diff: Microduino_Motor.h
- Revision:
- 2:7964622fb5a5
- Parent:
- 0:362c1482232c
diff -r 54a2d380f8c7 -r 7964622fb5a5 Microduino_Motor.h --- a/Microduino_Motor.h Fri Jul 01 09:41:15 2016 +0000 +++ b/Microduino_Motor.h Mon Jul 04 07:17:39 2016 +0000 @@ -1,24 +1,16 @@ #ifndef Motor_h #define Motor_h -//#include "Arduino.h" #include "mbed.h" #define CHAN_LEFT 0 #define CHAN_RIGHT 1 -#if 0 -typedef struct { - uint8_t nbr_A :6 ; - uint8_t nbr_B :6 ; -} MotorPin_t; -#else typedef struct { PinName nbr_A; PinName nbr_B; } MotorPin_t; -#endif typedef struct { MotorPin_t Pin; @@ -34,12 +26,12 @@ void Brake(); int16_t GetData(int16_t _throttle, int16_t _steering, uint8_t _dir); private: - uint8_t motorIndex; // index into the channel data for this key +// uint8_t motorIndex; // index into the channel data for this key float fix; int16_t _motor_vol; protected: pwmout_t _pwmA; - pwmout_t _pwmB; + gpio_t gpioB; int _period_us; };