Project

General

Profile

Statistics
| Revision:

root / trunk / docs / libdragonfly / lights_8h-source.html @ 1371

History | View | Annotate | Download (10.4 KB)

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
<title>libdragonfly: lights.h Source File</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
6
</head><body>
7
<!-- Generated by Doxygen 1.5.5 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13
      <li><a href="modules.html"><span>Modules</span></a></li>
14
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15
      <li class="current"><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
18
<h1>lights.h</h1><a href="lights_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// FIXME remove</span>
19
<a name="l00002"></a>00002 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> uint8_t;
20
<a name="l00003"></a>00003 
21
<a name="l00004"></a>00004 
22
<a name="l00041"></a>00041 <span class="preprocessor">#ifndef _LIGHTS_H_</span>
23
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define _LIGHTS_H_</span>
24
<a name="l00043"></a>00043 <span class="preprocessor"></span> <span class="comment">//end addtogroup</span>
25
<a name="l00113"></a>00113 
26
<a name="l00119"></a>00119 <span class="comment">// ***** Predefined colors *****</span>
27
<a name="l00121"></a><a class="code" href="group__orbs.html#g8d23feea868a983c8c2b661e1e16972f">00121</a> <span class="comment"></span><span class="preprocessor">#define RED       0xE0</span>
28
<a name="l00122"></a>00122 <span class="preprocessor"></span>
29
<a name="l00123"></a><a class="code" href="group__orbs.html#gc5b6e19bf06822021f35602c59658de3">00123</a> <span class="preprocessor">#define ORANGE    0xE4</span>
30
<a name="l00124"></a>00124 <span class="preprocessor"></span>
31
<a name="l00125"></a><a class="code" href="group__orbs.html#gbf681265909adf3d3e8116c93c0ba179">00125</a> <span class="preprocessor">#define YELLOW    0xE8</span>
32
<a name="l00126"></a>00126 <span class="preprocessor"></span>
33
<a name="l00127"></a><a class="code" href="group__orbs.html#g46019a1f2c10603a54b6cbb19cbf3c21">00127</a> <span class="preprocessor">#define LIME      0x68</span>
34
<a name="l00128"></a>00128 <span class="preprocessor"></span>
35
<a name="l00129"></a><a class="code" href="group__orbs.html#gcfbc006ea433ad708fdee3e82996e721">00129</a> <span class="preprocessor">#define GREEN     0x1C</span>
36
<a name="l00130"></a>00130 <span class="preprocessor"></span>
37
<a name="l00131"></a><a class="code" href="group__orbs.html#gd243f93c16bc4c1d3e0a13b84421d760">00131</a> <span class="preprocessor">#define CYAN      0x1F</span>
38
<a name="l00132"></a>00132 <span class="preprocessor"></span>
39
<a name="l00133"></a><a class="code" href="group__orbs.html#g79d10e672abb49ad63eeaa8aaef57c38">00133</a> <span class="preprocessor">#define BLUE      0x03</span>
40
<a name="l00134"></a>00134 <span class="preprocessor"></span>
41
<a name="l00135"></a><a class="code" href="group__orbs.html#gda419fe3b48fcf19daed7cc57ccf1174">00135</a> <span class="preprocessor">#define PINK      0xA6 </span>
42
<a name="l00136"></a>00136 <span class="preprocessor"></span>
43
<a name="l00137"></a><a class="code" href="group__orbs.html#g0bb0b009e7a7390473ace4d98bd843c0">00137</a> <span class="preprocessor">#define PURPLE    0x41</span>
44
<a name="l00138"></a>00138 <span class="preprocessor"></span>
45
<a name="l00139"></a><a class="code" href="group__orbs.html#g6f699060902f800f12aaae150f3a708e">00139</a> <span class="preprocessor">#define MAGENTA   0xE3</span>
46
<a name="l00140"></a>00140 <span class="preprocessor"></span>
47
<a name="l00141"></a><a class="code" href="group__orbs.html#g87b537f5fa5c109d3c05c13d6b18f382">00141</a> <span class="preprocessor">#define WHITE     0xFE</span>
48
<a name="l00142"></a>00142 <span class="preprocessor"></span>
49
<a name="l00143"></a><a class="code" href="group__orbs.html#gcf2f6da92d895ef5e594223f1e39e4b1">00143</a> <span class="preprocessor">#define ORB_OFF   0x00</span>
50
<a name="l00144"></a>00144 <span class="preprocessor"></span>
51
<a name="l00145"></a>00145 
52
<a name="l00146"></a>00146 
53
<a name="l00147"></a>00147 <span class="comment">// ***** Initialization *****</span>
54
<a name="l00148"></a>00148 
55
<a name="l00150"></a>00150 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs in default mode.">orb_init</a>(<span class="keywordtype">void</span>);
56
<a name="l00151"></a>00151 
57
<a name="l00153"></a>00153 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g55a2b60caf9fe91346bed89c7bba73b7" title="Enables the orbs in binary mode.">orb_init_binary</a> (<span class="keywordtype">void</span>);
58
<a name="l00154"></a>00154 
59
<a name="l00156"></a>00156 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#gbb9bc432db2639616a7e8b3211544891" title="Enables the orbs in PWM mode.">orb_init_pwm</a> (<span class="keywordtype">void</span>);
60
<a name="l00157"></a>00157 
61
<a name="l00158"></a>00158 
62
<a name="l00159"></a>00159 
63
<a name="l00160"></a>00160 <span class="comment">// ***** Mode setting *****</span>
64
<a name="l00161"></a>00161 
65
<a name="l00163"></a><a class="code" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">00163</a> <span class="keyword">typedef</span> uint8_t <a class="code" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a>;
66
<a name="l00164"></a>00164 
67
<a name="l00166"></a><a class="code" href="group__orbs.html#gc443bd65dba694ea9731f3ea455831a8">00166</a> <span class="preprocessor">#define orb_mode_pwm 0</span>
68
<a name="l00167"></a>00167 <span class="preprocessor"></span>
69
<a name="l00169"></a><a class="code" href="group__orbs.html#gf6cc675aa67ca9348717db3e53f18ae9">00169</a> <span class="preprocessor">#define orb_mode_binary 1</span>
70
<a name="l00170"></a>00170 <span class="preprocessor"></span>
71
<a name="l00171"></a>00171 
72
<a name="l00173"></a>00173 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#ga1d0fbfe351097e16652a658af5c8955" title="Switches the orbs to the specified mode.">orb_set_mode</a> (<a class="code" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a> mode);
73
<a name="l00174"></a>00174 
74
<a name="l00176"></a>00176 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#gf4effc092e3f85d937cea0ff72a003bf" title="Disables the orb timer, but does not change the mode.">orb_disable_timer</a> (<span class="keywordtype">void</span>);
75
<a name="l00177"></a>00177 
76
<a name="l00179"></a>00179 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#ge626892624d9bd87fa7dcd0ebd6d19f3" title="Enables the orb timer, but does not change the mode.">orb_enable_timer</a> (<span class="keywordtype">void</span>);
77
<a name="l00180"></a>00180 
78
<a name="l00181"></a>00181 
79
<a name="l00182"></a>00182 
80
<a name="l00183"></a>00183 <span class="comment">// ***** Setting RGB colors *****</span>
81
<a name="l00184"></a>00184 
82
<a name="l00186"></a>00186 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#ge066e81a39023cf8a36efd432bb9a4ff" title="set the specified orb to a specified color">orb_n_set</a> (uint8_t num, uint8_t red, uint8_t green, uint8_t blue);
83
<a name="l00187"></a>00187 
84
<a name="l00189"></a>00189 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g10dd6277826cd4c9305e48029c9011a4" title="Set both orbs to a specified color.">orb_set</a>(uint8_t red, uint8_t green, uint8_t blue);
85
<a name="l00190"></a>00190 
86
<a name="l00192"></a>00192 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g06c1b846b943bd327a2bc9f37b926497" title="Set orb1 to a specified color.">orb1_set</a>(uint8_t red_led, uint8_t green_led, uint8_t blue_led); 
87
<a name="l00193"></a>00193 
88
<a name="l00195"></a>00195 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g618af3d39cb8cd954248da295f7f234c" title="Set orb2 to a specified color.">orb2_set</a>(uint8_t red_led, uint8_t green_led, uint8_t blue_led);
89
<a name="l00196"></a>00196 
90
<a name="l00197"></a>00197 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g5ebe8d5597e2519d82486ce0a88906cc">orbs_set</a> (uint8_t red1, uint8_t green1, uint8_t blue1, uint8_t red2, uint8_t green2, uint8_t blue2);
91
<a name="l00198"></a>00198 
92
<a name="l00199"></a>00199 
93
<a name="l00200"></a>00200 
94
<a name="l00201"></a>00201 <span class="comment">// ***** Settings predefined colors *****</span>
95
<a name="l00202"></a>00202 
96
<a name="l00204"></a>00204 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g9bbced65e813e0937b7251a86853117f" title="set the specified orb to the specified color">orb_n_set_color</a>(uint8_t num, uint8_t col);
97
<a name="l00205"></a>00205 
98
<a name="l00207"></a>00207 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g0dede06855e46c8b8abdbce5779917ba" title="Set orb1 to a specified color.">orb1_set_color</a>(uint8_t col);
99
<a name="l00208"></a>00208 
100
<a name="l00210"></a>00210 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g1eb5f3accec23e5a2ea137e95f5070d6" title="Set orb2 to a specified color.">orb2_set_color</a>(uint8_t col);
101
<a name="l00211"></a>00211 
102
<a name="l00213"></a>00213 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g39224c46d5ed891d16e08239c959a8a8" title="set the orbs to specified colors">orbs_set_color</a>(uint8_t col1, uint8_t col2);
103
<a name="l00214"></a>00214 
104
<a name="l00216"></a>00216 <span class="keywordtype">void</span> <a class="code" href="group__orbs.html#g1710247e5331a3cb6076354a70e095e1" title="Set both orbs to a specified color.">orb_set_color</a>(uint8_t col);
105
<a name="l00217"></a>00217 
106
<a name="l00218"></a>00218 
107
<a name="l00219"></a>00219  <span class="comment">//end addtogroup</span>
108
<a name="l00221"></a>00221 
109
<a name="l00222"></a>00222 <span class="preprocessor">#endif</span>
110
</pre></div></div>
111
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 2 23:20:08 2009 for libdragonfly by&nbsp;
112
<a href="http://www.doxygen.org/index.html">
113
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
114
</body>
115
</html>