Library that controls BD6211F of rohm.

Dependents:   WallBot_Simple WallbotTypeN

BD6211F.h

Committer:
jksoft
Date:
2011-04-27
Revision:
0:e27bf165308f

File content as of revision 0:e27bf165308f:

/**
 * Motor Driver BD6211F Control Library
 *
 * -- BD6211F is a device of the rohm. 
 *
 * Copyright (C) 2011 Junichi Katsu (JKSOFT) 
 */

#ifndef MBED_BD6211F_H
#define MBED_BD6211F_H

#include "mbed.h"

class BD6211F {
public:
    BD6211F(PinName fwd, PinName rev);
    void speed(float speed);
    void move(float speed , float time);
	void operator= ( float value )
	{
		speed(value);
	}
	
protected:
    PwmOut _fwd;
    PwmOut _rev;
    Timeout timer;
    float    bspeed;
    bool     timer_flag;
    void timeout();

};

#endif