a

Committer:
jksoft
Date:
Mon Nov 12 16:39:11 2012 +0000
Revision:
1:051a7ecff13e
Parent:
0:810f315ba3dc
API??????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:810f315ba3dc 1 /**
jksoft 0:810f315ba3dc 2 * Motor Driver TB6612 Control Library
jksoft 0:810f315ba3dc 3 *
jksoft 0:810f315ba3dc 4 * -- TB6612 is a device of the rohm.
jksoft 0:810f315ba3dc 5 *
jksoft 0:810f315ba3dc 6 * Copyright (C) 2012 Junichi Katsu (JKSOFT)
jksoft 0:810f315ba3dc 7 */
jksoft 0:810f315ba3dc 8
jksoft 0:810f315ba3dc 9 #ifndef MBED_TB6612_H
jksoft 0:810f315ba3dc 10 #define MBED_TB6612_H
jksoft 0:810f315ba3dc 11
jksoft 0:810f315ba3dc 12 #include "mbed.h"
jksoft 0:810f315ba3dc 13
jksoft 0:810f315ba3dc 14 class TB6612 {
jksoft 0:810f315ba3dc 15 public:
jksoft 0:810f315ba3dc 16 TB6612(PinName pwm, PinName fwd, PinName rev);
jksoft 1:051a7ecff13e 17 void speed(int speed);
jksoft 1:051a7ecff13e 18 void move(int speed , int time);
jksoft 1:051a7ecff13e 19 void operator= ( int value )
jksoft 0:810f315ba3dc 20 {
jksoft 0:810f315ba3dc 21 speed(value);
jksoft 0:810f315ba3dc 22 }
jksoft 0:810f315ba3dc 23
jksoft 0:810f315ba3dc 24 protected:
jksoft 0:810f315ba3dc 25 PwmOut _pwm;
jksoft 0:810f315ba3dc 26 DigitalOut _fwd;
jksoft 0:810f315ba3dc 27 DigitalOut _rev;
jksoft 0:810f315ba3dc 28 };
jksoft 0:810f315ba3dc 29
jksoft 0:810f315ba3dc 30 #endif