Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

include/dmotor.h File Reference

Interface: direct motor control. More...

#include "../dmotor.h"
#include <config.h>

Include dependency graph for dmotor.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MIN_SPEED   0
 minimum motor speed. More...

#define MAX_SPEED   255
 maximum motor speed. More...


Enumerations

enum  MotorDirection { off = 0, fwd = 1, rev = 2, brake = 3 }
 the motor directions. More...


Functions

void motor_a_dir (MotorDirection dir)
 set motor A direction to dir. More...

void motor_b_dir (MotorDirection dir)
 set motor B direction to dir. More...

void motor_c_dir (MotorDirection dir)
 set motor C direction to dir. More...

void motor_a_speed (unsigned char speed)
 set motor A speed. More...

void motor_b_speed (unsigned char speed)
 set motor B speed. More...

void motor_c_speed (unsigned char speed)
 set motor C speed. More...


Variables

const unsigned char dm_a_pattern [4]
 motor drive patterns. More...

const unsigned char dm_b_pattern [4]
 motor drive patterns. More...

const unsigned char dm_c_pattern [4]
 motor drive patterns. More...

MotorState dm_a
 motor A state. More...

MotorState dm_b
 motor B state. More...

MotorState dm_c
 motor C state. More...


Detailed Description

Interface: direct motor control.

Author:
Markus L. Noga <markus@noga.de>

Definition in file dmotor.h.


Define Documentation

#define MAX_SPEED   255
 

maximum motor speed.

Definition at line 72 of file dmotor.h.

#define MIN_SPEED   0
 

minimum motor speed.

Definition at line 71 of file dmotor.h.


Enumeration Type Documentation

enum MotorDirection
 

the motor directions.

Enumeration values:
off  freewheel.
fwd  forward.
rev  reverse.
brake  hold current position.

Definition at line 44 of file dmotor.h.

Referenced by MotorPair::direction(), and Motor::off().


Function Documentation

void motor_a_dir MotorDirection    dir
 

set motor A direction to dir.

Referenced by Lamp::Lamp(), and Motor::Motor().

void motor_a_speed unsigned char    speed [inline]
 

set motor A speed.

Parameters:
speed  the speed

Definition at line 143 of file dmotor.h.

References dm_a.

Referenced by Lamp::Lamp(), and Motor::Motor().

void motor_b_dir MotorDirection    dir
 

set motor B direction to dir.

Referenced by Lamp::Lamp(), and Motor::Motor().

void motor_b_speed unsigned char    speed [inline]
 

set motor B speed.

Parameters:
speed  the speed

Definition at line 151 of file dmotor.h.

References dm_b.

Referenced by Lamp::Lamp(), and Motor::Motor().

void motor_c_dir MotorDirection    dir
 

set motor C direction to dir.

Referenced by Lamp::Lamp(), and Motor::Motor().

void motor_c_speed unsigned char    speed [inline]
 

set motor C speed.

Parameters:
speed  the speed

Definition at line 159 of file dmotor.h.

References dm_c.

Referenced by Lamp::Lamp(), and Motor::Motor().


Variable Documentation

MotorState dm_a
 

motor A state.

Definition at line 89 of file dmotor.h.

Referenced by motor_a_speed().

const unsigned char dm_a_pattern[4]
 

motor drive patterns.

to be indexed with MotorDirections

See also:
MotorDirections

Definition at line 84 of file dmotor.h.

MotorState dm_b
 

motor B state.

Definition at line 89 of file dmotor.h.

Referenced by motor_b_speed().

const unsigned char dm_b_pattern[4]
 

motor drive patterns.

to be indexed with MotorDirections

See also:
MotorDirections

Definition at line 84 of file dmotor.h.

MotorState dm_c
 

motor C state.

Definition at line 89 of file dmotor.h.

Referenced by motor_c_speed().

const unsigned char dm_c_pattern[4]
 

motor drive patterns.

to be indexed with MotorDirections

See also:
MotorDirections

Definition at line 84 of file dmotor.h.


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Tue Dec 10 00:09:06 2002 for brickOS C++ by doxygen 1.2.15