Project

General

Profile

Revision 891

Moved comments to headers. That was painful.

View differences:

motor.h
39 39
#define _MOTOR_H
40 40

  
41 41
#include <avr/io.h>
42

  
42 43
/**
43
 * @addtogroup motors
44
 * @defgroup motors Motors
45
 * @brief Functions for controlling the motors.
46
 * Functions for controlling the motors. Found in motor.h.
44 47
 * @{
45 48
 **/
46 49

  
50

  
47 51
/** @brief make the motors go forwards **/
48 52
#define FORWARD 1
49 53
/** @brief make the motors go backwards **/
50 54
#define BACKWARD 0
51 55

  
52
/** @brief Initialize the motors **/
56
/**
57
 * @brief Initialize the motors
58
 *
59
 * Initializes both motors so that they can be used with future
60
 * calls to motor1_set and motor2_set.
61
 *
62
 * @see motors_off, motor1_set, motor2_set
63
 **/
53 64
void motors_init(void);
54
/** @brief Set speed and direction of motor1 **/
65
/**
66
 * @brief Set speed and direction of motor1
67
 *
68
 * Sets the speed and direction of motor1.
69
 * motors_init must be called before this function can be used.
70
 *
71
 * @param direction Either FORWARD or BACKWARD to set the direction of rotation.
72
 * @param speed The speed the motor will run at, in the range 0-255.
73
 * 
74
 * @see motor2_set, motors_init
75
 **/
55 76
void motor1_set(int direction, int speed);
56
/** @brief Set speed and direction of motor2 **/
77
/**
78
 * @brief Set speed and direction of motor2
79
 *
80
 * Sets the speed and direction of motor2.
81
 * motors_init must be called before this function can be used.
82
 *
83
 * @param direction Either FORWARD or BACKWARD to set the direction of rotation.
84
 * @param speed The speed the motor will run at, in the range 0-255.
85
 *
86
 * @see motor1_set, motors_init
87
 **/
57 88
void motor2_set(int direction, int speed);
58
/** @brief Turn the motors off **/
89
/**
90
 * @brief Turn the motors off
91
 *
92
 * Turns off both motors.
93
 *
94
 * @see motors_init
95
 **/
59 96
void motors_off(void);
60 97

  
61 98
/**@}**/ // end addtogroup

Also available in: Unified diff