Project

General

Profile

Statistics
| Revision:

root / branches / simulator / lib / include / libdragonfly / dragonfly_lib.h @ 1072

History | View | Annotate | Download (3.11 KB)

1
/**
2
 * Copyright (c) 2007 Colony Project
3
 *
4
 * Permission is hereby granted, free of charge, to any person
5
 * obtaining a copy of this software and associated documentation
6
 * files (the "Software"), to deal in the Software without
7
 * restriction, including without limitation the rights to use,
8
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
9
 * copies of the Software, and to permit persons to whom the
10
 * Software is furnished to do so, subject to the following
11
 * conditions:
12
 *
13
 * The above copyright notice and this permission notice shall be
14
 * included in all copies or substantial portions of the Software.
15
 *
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
 * OTHER DEALINGS IN THE SOFTWARE.
24
 **/
25

    
26

    
27
/**
28
 * @file dragonfly_lib.h
29
 * @brief Contains other include files
30
 *
31
 * Include this file for all the functionality of libdragonfly.
32
 *
33
 * @author Colony Project, CMU Robotics Club
34
 **/
35

    
36
#ifndef _DRAGONFLY_LIB_H_
37
#define _DRAGONFLY_LIB_H_
38

    
39
/**
40
 * @defgroup dragonfly Dragonfly
41
 * @brief General Dragonfly Functions
42
 * General functions for the dragonfly. Include
43
 * dragonfly_lib.h to access these functions.
44
 *
45
 * @{
46
 **/
47

    
48
// Configuration definitions
49
/** @brief Initialize analog **/
50
#define ANALOG 0x01
51
/** @brief Initialize serial communications **/
52
#define SERIAL 0x02
53
/** @brief Initialize USB communications **/
54
#define USB    0x02
55
/** @brief Initialize communications **/
56
#define COMM   0x02
57
/** @brief Initialize the orb **/
58
#define ORB    0x04
59
/** @brief Initialize the motors **/
60
#define MOTORS 0x08
61
/** @brief Initialize the buzzer **/
62
#define BUZZER 0x10
63
/** @brief Initialize the LCD screen **/
64
#define LCD    0x20
65
/** @brief Initialize everything **/
66
#define ALL_ON 0xFF
67

    
68

    
69
/**
70
 * @brief Initialize the board.
71
 *
72
 * Initializes the components specified by config. Will turn on interrupts
73
 *         automatically.
74
 *
75
 *         @param config The subsystems that you wish to turn on. Check dragonfly_lib.h for
76
 *                         valid values.
77
 *
78
 * @see analog_init, usb_init, xbee_init, buzzer_init,
79
 * bom_init, orb_init, motors_init, lcd_init
80
 **/
81
void dragonfly_init(int config);
82

    
83
/**
84
 * @brief runs the simulator loop, if runninf in the simulator
85
 *
86
 * When compiled for the simulator, this call updates the simulator by
87
 * suspending the robot process, which allows the simulator core to
88
 * update the world state.
89
 *
90
 * This function should be called at the end of the main program loop.
91
 *
92
 * When compiled on the robot, this call does nothing
93
 **/
94
void simulator_do();
95

    
96
/** @} **/ //end addtogroup
97

    
98
#include <analog.h>
99
#include <dio.h>
100
#include <time.h>
101
#include <lcd.h>
102
#include <lights.h>
103
#include <motor.h>
104
#include <serial.h>
105
#include <buzzer.h>
106
#include <rangefinder.h>
107
#include <bom.h>
108
#include <move.h>
109
#include <reset.h>
110
#include <math.h>
111

    
112
#endif
113