root / trunk / code / projects / libdragonfly / lights.h @ 8
History | View | Annotate | Download (1.78 KB)
1 |
/**
|
---|---|
2 |
* @file lights.h
|
3 |
* @brief Contains declarations for managing the orbs.
|
4 |
*
|
5 |
* Contains declarations for using the orbs and PWM.
|
6 |
*
|
7 |
* @author Colony Project, CMU Robotics Club
|
8 |
* Based on Firefly Library, by Tom Lauwers and Steven Shamlian
|
9 |
**/
|
10 |
|
11 |
#ifndef _LIGHTS_H_
|
12 |
#define _LIGHTS_H_
|
13 |
|
14 |
|
15 |
/**
|
16 |
* @addtogroup orbs
|
17 |
* @{
|
18 |
**/
|
19 |
|
20 |
//ORB Colors
|
21 |
/** @brief Red **/
|
22 |
#define RED 0xE0 |
23 |
/** @brief Orange **/
|
24 |
#define ORANGE 0xE4 |
25 |
/** @brief Yellow **/
|
26 |
#define YELLOW 0xE8 |
27 |
/** @brief Lime **/
|
28 |
#define LIME 0x68 |
29 |
/** @brief Green **/
|
30 |
#define GREEN 0x1C |
31 |
/** @brief Cyan **/
|
32 |
#define CYAN 0x1F |
33 |
/** @brief Blue **/
|
34 |
#define BLUE 0x03 |
35 |
/** @brief Pink **/
|
36 |
#define PINK 0xA6 |
37 |
/** @brief Purple **/
|
38 |
#define PURPLE 0x41 |
39 |
/** @brief Magenta **/
|
40 |
#define MAGENTA 0xE3 |
41 |
/** @brief White **/
|
42 |
#define WHITE 0xFE |
43 |
/** @brief Turn the orb off (White) **/
|
44 |
#define ORB_OFF 0xFE //ORB_OFF->WHITE |
45 |
|
46 |
/** @brief Enables the orbs **/
|
47 |
void orb_init(void); |
48 |
/** @brief Set both orbs to a specified color **/
|
49 |
void orb_set(unsigned char red_led, unsigned char green_led, |
50 |
unsigned char blue_led); |
51 |
/** @brief Set orb1 to a specified color **/
|
52 |
void orb1_set(unsigned char red_led, unsigned char green_led, |
53 |
unsigned char blue_led); |
54 |
/** @brief Set orb2 to a specified color **/
|
55 |
void orb2_set(unsigned char red_led, unsigned char green_led, |
56 |
unsigned char blue_led); |
57 |
|
58 |
/** @brief Set both orbs to a specified color **/
|
59 |
void orb_set_color(int col); |
60 |
/** @brief Set orb1 to a specified color **/
|
61 |
void orb1_set_color(int col); |
62 |
/** @brief Set orb2 to a specified color **/
|
63 |
void orb2_set_color(int col); |
64 |
|
65 |
/** @brief Disable the orbs **/
|
66 |
void orb_disable(void); |
67 |
/** @brief Enable the orbs **/
|
68 |
void orb_enable(void); |
69 |
|
70 |
/** @} **/ //end addtogroup |
71 |
|
72 |
#endif
|
73 |
|