root / branches / simulator / projects / libdragonfly / include / dragonfly_lib.h @ 891
History | View | Annotate | Download (2.88 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 |
/** @} **/ //end addtogroup |
84 |
|
85 |
#include <inttypes.h> |
86 |
#include <stdio.h> |
87 |
#include <stdlib.h> |
88 |
#include <avr/io.h> |
89 |
#include <avr/interrupt.h> |
90 |
#include <util/delay.h> |
91 |
#include <util/twi.h> |
92 |
|
93 |
#include <analog.h> |
94 |
#include <dio.h> |
95 |
#include <time.h> |
96 |
#include <lcd.h> |
97 |
#include <lights.h> |
98 |
#include <motor.h> |
99 |
#include <serial.h> |
100 |
#include <buzzer.h> |
101 |
#include <rangefinder.h> |
102 |
#include <bom.h> |
103 |
#include <move.h> |
104 |
#include <reset.h> |
105 |
#include <math.h> |
106 |
|
107 |
#endif
|
108 |
|