First import from throwbot

Fork of TB6612FNG2 by Junichi Katsu

Committer:
Throwbot
Date:
Thu May 08 19:11:04 2014 +0000
Revision:
2:73cbc6028f7a
Parent:
1:051a7ecff13e
Child:
4:53e02c276f23
1

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:
Throwbot 2:73cbc6028f7a 16
Throwbot 2:73cbc6028f7a 17 int scale;
Throwbot 2:73cbc6028f7a 18
jksoft 0:810f315ba3dc 19 TB6612(PinName pwm, PinName fwd, PinName rev);
Throwbot 2:73cbc6028f7a 20
jksoft 1:051a7ecff13e 21 void speed(int speed);
jksoft 1:051a7ecff13e 22 void operator= ( int value )
jksoft 0:810f315ba3dc 23 {
jksoft 0:810f315ba3dc 24 speed(value);
jksoft 0:810f315ba3dc 25 }
jksoft 0:810f315ba3dc 26
jksoft 0:810f315ba3dc 27 protected:
jksoft 0:810f315ba3dc 28 PwmOut _pwm;
jksoft 0:810f315ba3dc 29 DigitalOut _fwd;
jksoft 0:810f315ba3dc 30 DigitalOut _rev;
jksoft 0:810f315ba3dc 31 };
jksoft 0:810f315ba3dc 32
jksoft 0:810f315ba3dc 33 #endif