root / trunk / docs / libdragonfly / group__orbs.html @ 1145
History | View | Annotate | Download (43.2 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: Orbs</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 Page</span></a></li> |
12 |
<li><a href="pages.html"><span>Related Pages</span></a></li> |
13 |
<li><a href="modules.html"><span>Modules</span></a></li> |
14 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
15 |
<li><a href="files.html"><span>Files</span></a></li> |
16 |
</ul>
|
17 |
</div>
|
18 |
</div>
|
19 |
<div class="contents"> |
20 |
<h1>Orbs</h1><table border="0" cellpadding="0" cellspacing="0"> |
21 |
<tr><td></td></tr> |
22 |
<tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
23 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g8d23feea868a983c8c2b661e1e16972f"></a><!-- doxytag: member="orbs::RED" ref="g8d23feea868a983c8c2b661e1e16972f" args="" --> |
24 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g8d23feea868a983c8c2b661e1e16972f">RED</a> 0xE0</td></tr> |
25 |
|
26 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Red. <br></td></tr> |
27 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc5b6e19bf06822021f35602c59658de3"></a><!-- doxytag: member="orbs::ORANGE" ref="gc5b6e19bf06822021f35602c59658de3" args="" --> |
28 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gc5b6e19bf06822021f35602c59658de3">ORANGE</a> 0xE4</td></tr> |
29 |
|
30 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Orange. <br></td></tr> |
31 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gbf681265909adf3d3e8116c93c0ba179"></a><!-- doxytag: member="orbs::YELLOW" ref="gbf681265909adf3d3e8116c93c0ba179" args="" --> |
32 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gbf681265909adf3d3e8116c93c0ba179">YELLOW</a> 0xE8</td></tr> |
33 |
|
34 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Yellow. <br></td></tr> |
35 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g46019a1f2c10603a54b6cbb19cbf3c21"></a><!-- doxytag: member="orbs::LIME" ref="g46019a1f2c10603a54b6cbb19cbf3c21" args="" --> |
36 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g46019a1f2c10603a54b6cbb19cbf3c21">LIME</a> 0x68</td></tr> |
37 |
|
38 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lime. <br></td></tr> |
39 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcfbc006ea433ad708fdee3e82996e721"></a><!-- doxytag: member="orbs::GREEN" ref="gcfbc006ea433ad708fdee3e82996e721" args="" --> |
40 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gcfbc006ea433ad708fdee3e82996e721">GREEN</a> 0x1C</td></tr> |
41 |
|
42 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Green. <br></td></tr> |
43 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gd243f93c16bc4c1d3e0a13b84421d760"></a><!-- doxytag: member="orbs::CYAN" ref="gd243f93c16bc4c1d3e0a13b84421d760" args="" --> |
44 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gd243f93c16bc4c1d3e0a13b84421d760">CYAN</a> 0x1F</td></tr> |
45 |
|
46 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cyan. <br></td></tr> |
47 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g79d10e672abb49ad63eeaa8aaef57c38"></a><!-- doxytag: member="orbs::BLUE" ref="g79d10e672abb49ad63eeaa8aaef57c38" args="" --> |
48 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g79d10e672abb49ad63eeaa8aaef57c38">BLUE</a> 0x03</td></tr> |
49 |
|
50 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Blue. <br></td></tr> |
51 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gda419fe3b48fcf19daed7cc57ccf1174"></a><!-- doxytag: member="orbs::PINK" ref="gda419fe3b48fcf19daed7cc57ccf1174" args="" --> |
52 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gda419fe3b48fcf19daed7cc57ccf1174">PINK</a> 0xA6</td></tr> |
53 |
|
54 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Pink. <br></td></tr> |
55 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0bb0b009e7a7390473ace4d98bd843c0"></a><!-- doxytag: member="orbs::PURPLE" ref="g0bb0b009e7a7390473ace4d98bd843c0" args="" --> |
56 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g0bb0b009e7a7390473ace4d98bd843c0">PURPLE</a> 0x41</td></tr> |
57 |
|
58 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Purple. <br></td></tr> |
59 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6f699060902f800f12aaae150f3a708e"></a><!-- doxytag: member="orbs::MAGENTA" ref="g6f699060902f800f12aaae150f3a708e" args="" --> |
60 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g6f699060902f800f12aaae150f3a708e">MAGENTA</a> 0xE3</td></tr> |
61 |
|
62 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Magenta. <br></td></tr> |
63 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g87b537f5fa5c109d3c05c13d6b18f382"></a><!-- doxytag: member="orbs::WHITE" ref="g87b537f5fa5c109d3c05c13d6b18f382" args="" --> |
64 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g87b537f5fa5c109d3c05c13d6b18f382">WHITE</a> 0xFE</td></tr> |
65 |
|
66 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">White. <br></td></tr> |
67 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcf2f6da92d895ef5e594223f1e39e4b1"></a><!-- doxytag: member="orbs::ORB_OFF" ref="gcf2f6da92d895ef5e594223f1e39e4b1" args="" --> |
68 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gcf2f6da92d895ef5e594223f1e39e4b1">ORB_OFF</a> 0x00</td></tr> |
69 |
|
70 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Turn the orb off. <br></td></tr> |
71 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gc443bd65dba694ea9731f3ea455831a8"></a><!-- doxytag: member="orbs::orb_mode_pwm" ref="gc443bd65dba694ea9731f3ea455831a8" args="" --> |
72 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gc443bd65dba694ea9731f3ea455831a8">orb_mode_pwm</a> 0</td></tr> |
73 |
|
74 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">PWM mode. <br></td></tr> |
75 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf6cc675aa67ca9348717db3e53f18ae9"></a><!-- doxytag: member="orbs::orb_mode_binary" ref="gf6cc675aa67ca9348717db3e53f18ae9" args="" --> |
76 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gf6cc675aa67ca9348717db3e53f18ae9">orb_mode_binary</a> 1</td></tr> |
77 |
|
78 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Binary mode. <br></td></tr> |
79 |
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> |
80 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a></td></tr> |
81 |
|
82 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
83 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9">orb_init</a> (void)</td></tr> |
84 |
|
85 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables the orbs in default mode. <a href="#g13069271f9d636674e9b4a8a355099b9"></a><br></td></tr> |
86 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g55a2b60caf9fe91346bed89c7bba73b7">orb_init_binary</a> (void)</td></tr> |
87 |
|
88 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables the orbs in binary mode. <a href="#g55a2b60caf9fe91346bed89c7bba73b7"></a><br></td></tr> |
89 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gbb9bc432db2639616a7e8b3211544891">orb_init_pwm</a> (void)</td></tr> |
90 |
|
91 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables the orbs in PWM mode. <a href="#gbb9bc432db2639616a7e8b3211544891"></a><br></td></tr> |
92 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga1d0fbfe351097e16652a658af5c8955"></a><!-- doxytag: member="orbs::orb_set_mode" ref="ga1d0fbfe351097e16652a658af5c8955" args="(orb_mode_t mode)" --> |
93 |
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ga1d0fbfe351097e16652a658af5c8955">orb_set_mode</a> (<a class="el" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a> mode)</td></tr> |
94 |
|
95 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Switches the orbs to the specified mode. <br></td></tr> |
96 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gf4effc092e3f85d937cea0ff72a003bf">orb_disable_timer</a> (void)</td></tr> |
97 |
|
98 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disables the orb timer, but does not change the mode. <a href="#gf4effc092e3f85d937cea0ff72a003bf"></a><br></td></tr> |
99 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ge626892624d9bd87fa7dcd0ebd6d19f3">orb_enable_timer</a> (void)</td></tr> |
100 |
|
101 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables the orb timer, but does not change the mode. <a href="#ge626892624d9bd87fa7dcd0ebd6d19f3"></a><br></td></tr> |
102 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ge066e81a39023cf8a36efd432bb9a4ff">orb_n_set</a> (uint8_t num, uint8_t red, uint8_t green, uint8_t blue)</td></tr> |
103 |
|
104 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the specified orb to a specified color <a href="#ge066e81a39023cf8a36efd432bb9a4ff"></a><br></td></tr> |
105 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g10dd6277826cd4c9305e48029c9011a4">orb_set</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr> |
106 |
|
107 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set both orbs to a specified color. <a href="#g10dd6277826cd4c9305e48029c9011a4"></a><br></td></tr> |
108 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g06c1b846b943bd327a2bc9f37b926497">orb1_set</a> (uint8_t red_led, uint8_t green_led, uint8_t blue_led)</td></tr> |
109 |
|
110 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set orb1 to a specified color. <a href="#g06c1b846b943bd327a2bc9f37b926497"></a><br></td></tr> |
111 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g618af3d39cb8cd954248da295f7f234c">orb2_set</a> (uint8_t red_led, uint8_t green_led, uint8_t blue_led)</td></tr> |
112 |
|
113 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set orb2 to a specified color. <a href="#g618af3d39cb8cd954248da295f7f234c"></a><br></td></tr> |
114 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" 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)</td></tr> |
115 |
|
116 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g9bbced65e813e0937b7251a86853117f">orb_n_set_color</a> (uint8_t num, uint8_t col)</td></tr> |
117 |
|
118 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the specified orb to the specified color <a href="#g9bbced65e813e0937b7251a86853117f"></a><br></td></tr> |
119 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g0dede06855e46c8b8abdbce5779917ba">orb1_set_color</a> (uint8_t col)</td></tr> |
120 |
|
121 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set orb1 to a specified color. <a href="#g0dede06855e46c8b8abdbce5779917ba"></a><br></td></tr> |
122 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g1eb5f3accec23e5a2ea137e95f5070d6">orb2_set_color</a> (uint8_t col)</td></tr> |
123 |
|
124 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set orb2 to a specified color. <a href="#g1eb5f3accec23e5a2ea137e95f5070d6"></a><br></td></tr> |
125 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g39224c46d5ed891d16e08239c959a8a8">orbs_set_color</a> (uint8_t col1, uint8_t col2)</td></tr> |
126 |
|
127 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the orbs to specified colors <a href="#g39224c46d5ed891d16e08239c959a8a8"></a><br></td></tr> |
128 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g1710247e5331a3cb6076354a70e095e1">orb_set_color</a> (uint8_t col)</td></tr> |
129 |
|
130 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set both orbs to a specified color. <a href="#g1710247e5331a3cb6076354a70e095e1"></a><br></td></tr> |
131 |
</table>
|
132 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
133 |
Quick start: call orb_init_pwm or orb_init_binary, depending on which mode you want to use. Call orb*set or orb*set_color to set the orbs.<p>
|
134 |
The orbs have two modes of operation: PWM mode and binary mode. In PWM mode, a pwm signal is generated by a hardware timer and the orbs can be set to a value of 0 through 255. In binary mode, the orbs can only be turned on or off and a value of 0 means "off" and any other value means "on". The mode can be chosen on initialization and can be changed at runtime using the orb_set_mode function.<p>
|
135 |
Operation (PWM mode): On timer overflow, all LEDs with a value>0 are turned on and the output compare value for the first LED is loaded. On compare match, the corresponding LED is turned off and the next output compare value is loaded. All masks are precomputed and sorted by time when setting the values.<p> |
136 |
The data structure (pwm_t) containing the PWM times and masks is triple buffered. This is because the buffer the ISR is reading from may only be modified on timer overflow before the next PWM sequence is started, because otherwise the next OCR value might be sed to a value smaller than the current timer value, resulting in the remaining channels not being turned off in that PWM period (flash to on). When using two buffers, the page flip can only occur on a timer overflow for the same reason. So after writing a buffer and marking it for page flip, neither of the buffers could be modified because the front buffer is read by the ISR and the back buffer could be switched at any time. So the calling thread would have to be delayed by up to one full PWM period (8ms in the current implementation, but 20ms-50ms would be a reasonable value to expect here). To avoid this, triple buffering is used.<p>
|
137 |
The code for applying the orbs is fairly optimized. See the apply_orbs function for some time measurements and further nodes.<p>
|
138 |
The PWM frequency is 120Hz (8ms period time). The next lower frequency (determined by the prescaler) is 30 Hz which is too slow (orbs flicker).<p>
|
139 |
The orbs code is thread safe, which means that the functions may be called from another interrupt handler. If there are multiple concurrent calls to the orb*set* functions, one of them is ignored and the orbs are never left in an inconsistent state. For example, if the orbs are set to green by the main thread and to red by an interrupt handler, the resulting color will be either red or green, but never yellow. Thread safety is achieved by grabbing a lock at the beginning of all functions that modify the orb code and releasing the lock at the end. If the lock is already taken, the function just returns doing nothing.<p>
|
140 |
Some performance measurements:<ul>
|
141 |
<li>Time for setting new orb values (PWM mode): 35us-72us (depending on the degree to which the array is already in the correct order)</li><li>Time for setting new orb values (binary mode): 5.5us</li></ul> |
142 |
<p>
|
143 |
<ul>
|
144 |
<li>Interrupt time (PWM mode only): 8us (overflow) 10us (output compare) 6us (last output compare) 30us (output compare, all value equal)</li></ul> |
145 |
<p>
|
146 |
<ul>
|
147 |
<li>Maximum total interrupt time per period: 64us</li><li>Maximum CPU usage for interrupts (PWM mode only): <0.8%</li></ul> |
148 |
<p>
|
149 |
<ul>
|
150 |
<li>Maximum contiguous synchronized block: 30us (output compare interrupt, all values equal)</li></ul> |
151 |
<p>
|
152 |
There are some potential optimizations left. See the source code for more information.<p>
|
153 |
A note on robustness: if the output compare interrupt is disabled for too long, either due to a long ISR or a long synchronized code block, the orbs will flicker to brighter values for being turned off too late. With software PWM, there's nothing at all to be done about that. The problem can be alleviated by using a lower PWM frequency, but then the orbs will start flickering all the time due to the low update frequency. Some measurements: with 100us synchronized blocks, the flickering is accepptably low. Longer synchronized blocks mean more flickering. At 1ms synchronized blocks, the flickering is quite bad, especially for low orb values. Note that orb value 0 never flickers at all because the corresponding channels are not turned on at all. Test code (note the _delay_us restrictions!) orb_set (1,1,1); while (1) { SYNC { for (uint8_t m=0; m<10; ++m) { _delay_us(10); } } } <hr><h2>Typedef Documentation</h2> |
154 |
<a class="anchor" name="ge1444a97f794787d7ffaa5ec12e2a1e2"></a><!-- doxytag: member="lights.h::orb_mode_t" ref="ge1444a97f794787d7ffaa5ec12e2a1e2" args="" --> |
155 |
<div class="memitem"> |
156 |
<div class="memproto"> |
157 |
<table class="memname"> |
158 |
<tr>
|
159 |
<td class="memname">typedef uint8_t <a class="el" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a> </td> |
160 |
</tr>
|
161 |
</table>
|
162 |
</div>
|
163 |
<div class="memdoc"> |
164 |
|
165 |
<p>
|
166 |
Specification of the orb mode |
167 |
</div>
|
168 |
</div><p> |
169 |
<hr><h2>Function Documentation</h2> |
170 |
<a class="anchor" name="g06c1b846b943bd327a2bc9f37b926497"></a><!-- doxytag: member="lights.h::orb1_set" ref="g06c1b846b943bd327a2bc9f37b926497" args="(uint8_t red_led, uint8_t green_led, uint8_t blue_led)" --> |
171 |
<div class="memitem"> |
172 |
<div class="memproto"> |
173 |
<table class="memname"> |
174 |
<tr>
|
175 |
<td class="memname">void orb1_set </td> |
176 |
<td>(</td> |
177 |
<td class="paramtype">uint8_t </td> |
178 |
<td class="paramname"> <em>red</em>, </td> |
179 |
</tr>
|
180 |
<tr>
|
181 |
<td class="paramkey"></td> |
182 |
<td></td> |
183 |
<td class="paramtype">uint8_t </td> |
184 |
<td class="paramname"> <em>green</em>, </td> |
185 |
</tr>
|
186 |
<tr>
|
187 |
<td class="paramkey"></td> |
188 |
<td></td> |
189 |
<td class="paramtype">uint8_t </td> |
190 |
<td class="paramname"> <em>blue</em></td><td> </td> |
191 |
</tr>
|
192 |
<tr>
|
193 |
<td></td> |
194 |
<td>)</td> |
195 |
<td></td><td></td><td width="100%"></td> |
196 |
</tr>
|
197 |
</table>
|
198 |
</div>
|
199 |
<div class="memdoc"> |
200 |
|
201 |
<p>
|
202 |
Set orb1 to a specified color. |
203 |
<p>
|
204 |
Set orb1 to the color specified. The orbs must be initialized before this function may be used. Note that, when setting both orbs, using orbs_set is faster then setting the orbs individually because the values are only sorted once.<p>
|
205 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
206 |
<table border="0" cellspacing="2" cellpadding="0"> |
207 |
<tr><td valign="top"></td><td valign="top"><em>red</em> </td><td>the red component of the color </td></tr> |
208 |
<tr><td valign="top"></td><td valign="top"><em>green</em> </td><td>the green component of the color </td></tr> |
209 |
<tr><td valign="top"></td><td valign="top"><em>blue</em> </td><td>the blue component of the color</td></tr> |
210 |
</table>
|
211 |
</dl>
|
212 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs in default mode.">orb_init</a> </dd></dl> |
213 |
|
214 |
<p>References <a class="el" href="dragonfly__lib_8h-source.html#l00110">RELEASE_LOCK</a>, and <a class="el" href="dragonfly__lib_8h-source.html#l00107">REQUIRE_LOCK_OR_RETURN</a>.</p> |
215 |
|
216 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00611">orb1_set_color()</a>.</p> |
217 |
|
218 |
</div>
|
219 |
</div><p> |
220 |
<a class="anchor" name="g0dede06855e46c8b8abdbce5779917ba"></a><!-- doxytag: member="lights.h::orb1_set_color" ref="g0dede06855e46c8b8abdbce5779917ba" args="(uint8_t col)" --> |
221 |
<div class="memitem"> |
222 |
<div class="memproto"> |
223 |
<table class="memname"> |
224 |
<tr>
|
225 |
<td class="memname">void orb1_set_color </td> |
226 |
<td>(</td> |
227 |
<td class="paramtype">uint8_t </td> |
228 |
<td class="paramname"> <em>col</em> </td> |
229 |
<td> ) </td> |
230 |
<td width="100%"></td> |
231 |
</tr>
|
232 |
</table>
|
233 |
</div>
|
234 |
<div class="memdoc"> |
235 |
|
236 |
<p>
|
237 |
Set orb1 to a specified color. |
238 |
<p>
|
239 |
Set orb1 to the specified color. This function is intended to be used with the predefined colors.<p>
|
240 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
241 |
<table border="0" cellspacing="2" cellpadding="0"> |
242 |
<tr><td valign="top"></td><td valign="top"><em>col</em> </td><td>the color to set the orbs to </td></tr> |
243 |
</table>
|
244 |
</dl>
|
245 |
|
246 |
<p>References <a class="el" href="lights_8c-source.html#l00506">orb1_set()</a>.</p> |
247 |
|
248 |
</div>
|
249 |
</div><p> |
250 |
<a class="anchor" name="g618af3d39cb8cd954248da295f7f234c"></a><!-- doxytag: member="lights.h::orb2_set" ref="g618af3d39cb8cd954248da295f7f234c" args="(uint8_t red_led, uint8_t green_led, uint8_t blue_led)" --> |
251 |
<div class="memitem"> |
252 |
<div class="memproto"> |
253 |
<table class="memname"> |
254 |
<tr>
|
255 |
<td class="memname">void orb2_set </td> |
256 |
<td>(</td> |
257 |
<td class="paramtype">uint8_t </td> |
258 |
<td class="paramname"> <em>red</em>, </td> |
259 |
</tr>
|
260 |
<tr>
|
261 |
<td class="paramkey"></td> |
262 |
<td></td> |
263 |
<td class="paramtype">uint8_t </td> |
264 |
<td class="paramname"> <em>green</em>, </td> |
265 |
</tr>
|
266 |
<tr>
|
267 |
<td class="paramkey"></td> |
268 |
<td></td> |
269 |
<td class="paramtype">uint8_t </td> |
270 |
<td class="paramname"> <em>blue</em></td><td> </td> |
271 |
</tr>
|
272 |
<tr>
|
273 |
<td></td> |
274 |
<td>)</td> |
275 |
<td></td><td></td><td width="100%"></td> |
276 |
</tr>
|
277 |
</table>
|
278 |
</div>
|
279 |
<div class="memdoc"> |
280 |
|
281 |
<p>
|
282 |
Set orb2 to a specified color. |
283 |
<p>
|
284 |
Set orb2 to the color specified. The orbs must be initialized before this function may be used. Note that, when setting both orbs, using orbs_set is faster then setting the orbs individually because the values are only sorted once.<p>
|
285 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
286 |
<table border="0" cellspacing="2" cellpadding="0"> |
287 |
<tr><td valign="top"></td><td valign="top"><em>red_led</em> </td><td>the red component of the color </td></tr> |
288 |
<tr><td valign="top"></td><td valign="top"><em>green_led</em> </td><td>the green component of the color </td></tr> |
289 |
<tr><td valign="top"></td><td valign="top"><em>blue_led</em> </td><td>the blue component of the color</td></tr> |
290 |
</table>
|
291 |
</dl>
|
292 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs in default mode.">orb_init</a> </dd></dl> |
293 |
|
294 |
<p>References <a class="el" href="dragonfly__lib_8h-source.html#l00110">RELEASE_LOCK</a>, and <a class="el" href="dragonfly__lib_8h-source.html#l00107">REQUIRE_LOCK_OR_RETURN</a>.</p> |
295 |
|
296 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00620">orb2_set_color()</a>.</p> |
297 |
|
298 |
</div>
|
299 |
</div><p> |
300 |
<a class="anchor" name="g1eb5f3accec23e5a2ea137e95f5070d6"></a><!-- doxytag: member="lights.h::orb2_set_color" ref="g1eb5f3accec23e5a2ea137e95f5070d6" args="(uint8_t col)" --> |
301 |
<div class="memitem"> |
302 |
<div class="memproto"> |
303 |
<table class="memname"> |
304 |
<tr>
|
305 |
<td class="memname">void orb2_set_color </td> |
306 |
<td>(</td> |
307 |
<td class="paramtype">uint8_t </td> |
308 |
<td class="paramname"> <em>col</em> </td> |
309 |
<td> ) </td> |
310 |
<td width="100%"></td> |
311 |
</tr>
|
312 |
</table>
|
313 |
</div>
|
314 |
<div class="memdoc"> |
315 |
|
316 |
<p>
|
317 |
Set orb2 to a specified color. |
318 |
<p>
|
319 |
Set orb2 to the specified color. This function is intended to be used with the predefined colors.<p>
|
320 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
321 |
<table border="0" cellspacing="2" cellpadding="0"> |
322 |
<tr><td valign="top"></td><td valign="top"><em>col</em> </td><td>the color to set the orbs to </td></tr> |
323 |
</table>
|
324 |
</dl>
|
325 |
|
326 |
<p>References <a class="el" href="lights_8c-source.html#l00526">orb2_set()</a>.</p> |
327 |
|
328 |
</div>
|
329 |
</div><p> |
330 |
<a class="anchor" name="gf4effc092e3f85d937cea0ff72a003bf"></a><!-- doxytag: member="lights.h::orb_disable_timer" ref="gf4effc092e3f85d937cea0ff72a003bf" args="(void)" --> |
331 |
<div class="memitem"> |
332 |
<div class="memproto"> |
333 |
<table class="memname"> |
334 |
<tr>
|
335 |
<td class="memname">void orb_disable_timer </td> |
336 |
<td>(</td> |
337 |
<td class="paramtype">void </td> |
338 |
<td class="paramname"> </td> |
339 |
<td> ) </td> |
340 |
<td width="100%"></td> |
341 |
</tr>
|
342 |
</table>
|
343 |
</div>
|
344 |
<div class="memdoc"> |
345 |
|
346 |
<p>
|
347 |
Disables the orb timer, but does not change the mode. |
348 |
<p>
|
349 |
Disables the orb timer. Note that you usually don't want to use this function directly. Instead, use orb_set_mode. <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#ga1d0fbfe351097e16652a658af5c8955" title="Switches the orbs to the specified mode.">orb_set_mode</a> </dd></dl> |
350 |
|
351 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p> |
352 |
|
353 |
</div>
|
354 |
</div><p> |
355 |
<a class="anchor" name="ge626892624d9bd87fa7dcd0ebd6d19f3"></a><!-- doxytag: member="lights.h::orb_enable_timer" ref="ge626892624d9bd87fa7dcd0ebd6d19f3" args="(void)" --> |
356 |
<div class="memitem"> |
357 |
<div class="memproto"> |
358 |
<table class="memname"> |
359 |
<tr>
|
360 |
<td class="memname">void orb_enable_timer </td> |
361 |
<td>(</td> |
362 |
<td class="paramtype">void </td> |
363 |
<td class="paramname"> </td> |
364 |
<td> ) </td> |
365 |
<td width="100%"></td> |
366 |
</tr>
|
367 |
</table>
|
368 |
</div>
|
369 |
<div class="memdoc"> |
370 |
|
371 |
<p>
|
372 |
Enables the orb timer, but does not change the mode. |
373 |
<p>
|
374 |
Enables the orb timer. Note that you usually don't want to use this function directly. Instead, use orb_set_mode. <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#ga1d0fbfe351097e16652a658af5c8955" title="Switches the orbs to the specified mode.">orb_set_mode</a> </dd></dl> |
375 |
|
376 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p> |
377 |
|
378 |
</div>
|
379 |
</div><p> |
380 |
<a class="anchor" name="g13069271f9d636674e9b4a8a355099b9"></a><!-- doxytag: member="lights.h::orb_init" ref="g13069271f9d636674e9b4a8a355099b9" args="(void)" --> |
381 |
<div class="memitem"> |
382 |
<div class="memproto"> |
383 |
<table class="memname"> |
384 |
<tr>
|
385 |
<td class="memname">void orb_init </td> |
386 |
<td>(</td> |
387 |
<td class="paramtype">void </td> |
388 |
<td class="paramname"> </td> |
389 |
<td> ) </td> |
390 |
<td width="100%"></td> |
391 |
</tr>
|
392 |
</table>
|
393 |
</div>
|
394 |
<div class="memdoc"> |
395 |
|
396 |
<p>
|
397 |
Enables the orbs in default mode. |
398 |
<p>
|
399 |
Initializes the orbs in default mode. One of the orb_init* functions must be called before the orbs can be used. Use the orb_init_binary or orb_init_pwm function if you want one specific mode.<p>
|
400 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#gbb9bc432db2639616a7e8b3211544891" title="Enables the orbs in PWM mode.">orb_init_pwm</a> <p> |
401 |
<a class="el" href="group__orbs.html#g55a2b60caf9fe91346bed89c7bba73b7" title="Enables the orbs in binary mode.">orb_init_binary</a> </dd></dl> |
402 |
|
403 |
<p>References <a class="el" href="lights_8c-source.html#l00743">orb_init_pwm()</a>.</p> |
404 |
|
405 |
<p>Referenced by <a class="el" href="dragonfly__lib_8c-source.html#l00068">dragonfly_init()</a>.</p> |
406 |
|
407 |
</div>
|
408 |
</div><p> |
409 |
<a class="anchor" name="g55a2b60caf9fe91346bed89c7bba73b7"></a><!-- doxytag: member="lights.h::orb_init_binary" ref="g55a2b60caf9fe91346bed89c7bba73b7" args="(void)" --> |
410 |
<div class="memitem"> |
411 |
<div class="memproto"> |
412 |
<table class="memname"> |
413 |
<tr>
|
414 |
<td class="memname">void orb_init_binary </td> |
415 |
<td>(</td> |
416 |
<td class="paramtype">void </td> |
417 |
<td class="paramname"> </td> |
418 |
<td> ) </td> |
419 |
<td width="100%"></td> |
420 |
</tr>
|
421 |
</table>
|
422 |
</div>
|
423 |
<div class="memdoc"> |
424 |
|
425 |
<p>
|
426 |
Enables the orbs in binary mode. |
427 |
<p>
|
428 |
Initializes the orbs in PWM mode. One of the orb_init* functions must be called before the orbs can be used.<p>
|
429 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#gbb9bc432db2639616a7e8b3211544891" title="Enables the orbs in PWM mode.">orb_init_pwm</a> </dd></dl> |
430 |
|
431 |
<p>References <a class="el" href="lights_8h-source.html#l00169">orb_mode_binary</a>, and <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p> |
432 |
|
433 |
</div>
|
434 |
</div><p> |
435 |
<a class="anchor" name="gbb9bc432db2639616a7e8b3211544891"></a><!-- doxytag: member="lights.h::orb_init_pwm" ref="gbb9bc432db2639616a7e8b3211544891" args="(void)" --> |
436 |
<div class="memitem"> |
437 |
<div class="memproto"> |
438 |
<table class="memname"> |
439 |
<tr>
|
440 |
<td class="memname">void orb_init_pwm </td> |
441 |
<td>(</td> |
442 |
<td class="paramtype">void </td> |
443 |
<td class="paramname"> </td> |
444 |
<td> ) </td> |
445 |
<td width="100%"></td> |
446 |
</tr>
|
447 |
</table>
|
448 |
</div>
|
449 |
<div class="memdoc"> |
450 |
|
451 |
<p>
|
452 |
Enables the orbs in PWM mode. |
453 |
<p>
|
454 |
Initializes the orbs in PWM mode. One of the orb_init* functions must be called before the orbs can be used.<p>
|
455 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g55a2b60caf9fe91346bed89c7bba73b7" title="Enables the orbs in binary mode.">orb_init_binary</a> </dd></dl> |
456 |
|
457 |
<p>References <a class="el" href="lights_8h-source.html#l00166">orb_mode_pwm</a>, and <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p> |
458 |
|
459 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00755">orb_init()</a>.</p> |
460 |
|
461 |
</div>
|
462 |
</div><p> |
463 |
<a class="anchor" name="ge066e81a39023cf8a36efd432bb9a4ff"></a><!-- doxytag: member="lights.h::orb_n_set" ref="ge066e81a39023cf8a36efd432bb9a4ff" args="(uint8_t num, uint8_t red, uint8_t green, uint8_t blue)" --> |
464 |
<div class="memitem"> |
465 |
<div class="memproto"> |
466 |
<table class="memname"> |
467 |
<tr>
|
468 |
<td class="memname">void orb_n_set </td> |
469 |
<td>(</td> |
470 |
<td class="paramtype">uint8_t </td> |
471 |
<td class="paramname"> <em>num</em>, </td> |
472 |
</tr>
|
473 |
<tr>
|
474 |
<td class="paramkey"></td> |
475 |
<td></td> |
476 |
<td class="paramtype">uint8_t </td> |
477 |
<td class="paramname"> <em>red</em>, </td> |
478 |
</tr>
|
479 |
<tr>
|
480 |
<td class="paramkey"></td> |
481 |
<td></td> |
482 |
<td class="paramtype">uint8_t </td> |
483 |
<td class="paramname"> <em>green</em>, </td> |
484 |
</tr>
|
485 |
<tr>
|
486 |
<td class="paramkey"></td> |
487 |
<td></td> |
488 |
<td class="paramtype">uint8_t </td> |
489 |
<td class="paramname"> <em>blue</em></td><td> </td> |
490 |
</tr>
|
491 |
<tr>
|
492 |
<td></td> |
493 |
<td>)</td> |
494 |
<td></td><td></td><td width="100%"></td> |
495 |
</tr>
|
496 |
</table>
|
497 |
</div>
|
498 |
<div class="memdoc"> |
499 |
|
500 |
<p>
|
501 |
set the specified orb to a specified color |
502 |
<p>
|
503 |
Sets the specified orb to the specified color. The orbs must be initialized before this function may be used. Note that, when setting both orbs, using orbs_set is faster then setting the orbs individually because the values are only sorted once.<p>
|
504 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
505 |
<table border="0" cellspacing="2" cellpadding="0"> |
506 |
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>the number of the orb to set (0 or 1) </td></tr> |
507 |
<tr><td valign="top"></td><td valign="top"><em>red</em> </td><td>the red value for the specified orb </td></tr> |
508 |
<tr><td valign="top"></td><td valign="top"><em>green</em> </td><td>the green value for the specified orb </td></tr> |
509 |
<tr><td valign="top"></td><td valign="top"><em>blue</em> </td><td>the blue value for the specified orb </td></tr> |
510 |
</table>
|
511 |
</dl>
|
512 |
<dl class="see" compact><dt><b>See also:</b></dt><dd></dd></dl> |
513 |
|
514 |
<p>References <a class="el" href="dragonfly__lib_8h-source.html#l00110">RELEASE_LOCK</a>, and <a class="el" href="dragonfly__lib_8h-source.html#l00107">REQUIRE_LOCK_OR_RETURN</a>.</p> |
515 |
|
516 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00602">orb_n_set_color()</a>.</p> |
517 |
|
518 |
</div>
|
519 |
</div><p> |
520 |
<a class="anchor" name="g9bbced65e813e0937b7251a86853117f"></a><!-- doxytag: member="lights.h::orb_n_set_color" ref="g9bbced65e813e0937b7251a86853117f" args="(uint8_t num, uint8_t col)" --> |
521 |
<div class="memitem"> |
522 |
<div class="memproto"> |
523 |
<table class="memname"> |
524 |
<tr>
|
525 |
<td class="memname">void orb_n_set_color </td> |
526 |
<td>(</td> |
527 |
<td class="paramtype">uint8_t </td> |
528 |
<td class="paramname"> <em>num</em>, </td> |
529 |
</tr>
|
530 |
<tr>
|
531 |
<td class="paramkey"></td> |
532 |
<td></td> |
533 |
<td class="paramtype">uint8_t </td> |
534 |
<td class="paramname"> <em>col</em></td><td> </td> |
535 |
</tr>
|
536 |
<tr>
|
537 |
<td></td> |
538 |
<td>)</td> |
539 |
<td></td><td></td><td width="100%"></td> |
540 |
</tr>
|
541 |
</table>
|
542 |
</div>
|
543 |
<div class="memdoc"> |
544 |
|
545 |
<p>
|
546 |
set the specified orb to the specified color |
547 |
<p>
|
548 |
Set the specified orb to the specified color. This function is intended to be used with the predefined colors.<p>
|
549 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
550 |
<table border="0" cellspacing="2" cellpadding="0"> |
551 |
<tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>the number of the orb to set (0 or 1) </td></tr> |
552 |
<tr><td valign="top"></td><td valign="top"><em>col</em> </td><td>the color to set the orbs to </td></tr> |
553 |
</table>
|
554 |
</dl>
|
555 |
|
556 |
<p>References <a class="el" href="lights_8c-source.html#l00486">orb_n_set()</a>.</p> |
557 |
|
558 |
</div>
|
559 |
</div><p> |
560 |
<a class="anchor" name="g10dd6277826cd4c9305e48029c9011a4"></a><!-- doxytag: member="lights.h::orb_set" ref="g10dd6277826cd4c9305e48029c9011a4" args="(uint8_t red, uint8_t green, uint8_t blue)" --> |
561 |
<div class="memitem"> |
562 |
<div class="memproto"> |
563 |
<table class="memname"> |
564 |
<tr>
|
565 |
<td class="memname">void orb_set </td> |
566 |
<td>(</td> |
567 |
<td class="paramtype">uint8_t </td> |
568 |
<td class="paramname"> <em>red</em>, </td> |
569 |
</tr>
|
570 |
<tr>
|
571 |
<td class="paramkey"></td> |
572 |
<td></td> |
573 |
<td class="paramtype">uint8_t </td> |
574 |
<td class="paramname"> <em>green</em>, </td> |
575 |
</tr>
|
576 |
<tr>
|
577 |
<td class="paramkey"></td> |
578 |
<td></td> |
579 |
<td class="paramtype">uint8_t </td> |
580 |
<td class="paramname"> <em>blue</em></td><td> </td> |
581 |
</tr>
|
582 |
<tr>
|
583 |
<td></td> |
584 |
<td>)</td> |
585 |
<td></td><td></td><td width="100%"></td> |
586 |
</tr>
|
587 |
</table>
|
588 |
</div>
|
589 |
<div class="memdoc"> |
590 |
|
591 |
<p>
|
592 |
Set both orbs to a specified color. |
593 |
<p>
|
594 |
Set both orbs to the color specified. The orbs must be initialized before this function may be used.<p>
|
595 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
596 |
<table border="0" cellspacing="2" cellpadding="0"> |
597 |
<tr><td valign="top"></td><td valign="top"><em>red_led</em> </td><td>the red component of the color </td></tr> |
598 |
<tr><td valign="top"></td><td valign="top"><em>green_led</em> </td><td>the green component of the color </td></tr> |
599 |
<tr><td valign="top"></td><td valign="top"><em>blue_led</em> </td><td>the blue component of the color</td></tr> |
600 |
</table>
|
601 |
</dl>
|
602 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs in default mode.">orb_init</a>, <a class="el" href="group__orbs.html#g06c1b846b943bd327a2bc9f37b926497" title="Set orb1 to a specified color.">orb1_set</a>, <a class="el" href="group__orbs.html#g618af3d39cb8cd954248da295f7f234c" title="Set orb2 to a specified color.">orb2_set</a> </dd></dl> |
603 |
|
604 |
<p>References <a class="el" href="dragonfly__lib_8h-source.html#l00110">RELEASE_LOCK</a>, and <a class="el" href="dragonfly__lib_8h-source.html#l00107">REQUIRE_LOCK_OR_RETURN</a>.</p> |
605 |
|
606 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00629">orb_set_color()</a>.</p> |
607 |
|
608 |
</div>
|
609 |
</div><p> |
610 |
<a class="anchor" name="g1710247e5331a3cb6076354a70e095e1"></a><!-- doxytag: member="lights.h::orb_set_color" ref="g1710247e5331a3cb6076354a70e095e1" args="(uint8_t col)" --> |
611 |
<div class="memitem"> |
612 |
<div class="memproto"> |
613 |
<table class="memname"> |
614 |
<tr>
|
615 |
<td class="memname">void orb_set_color </td> |
616 |
<td>(</td> |
617 |
<td class="paramtype">uint8_t </td> |
618 |
<td class="paramname"> <em>col</em> </td> |
619 |
<td> ) </td> |
620 |
<td width="100%"></td> |
621 |
</tr>
|
622 |
</table>
|
623 |
</div>
|
624 |
<div class="memdoc"> |
625 |
|
626 |
<p>
|
627 |
Set both orbs to a specified color. |
628 |
<p>
|
629 |
Set both orbs to the specified color. This function is intended to be used with the predefined colors.<p>
|
630 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
631 |
<table border="0" cellspacing="2" cellpadding="0"> |
632 |
<tr><td valign="top"></td><td valign="top"><em>col</em> </td><td>the color to set the orbs to </td></tr> |
633 |
</table>
|
634 |
</dl>
|
635 |
|
636 |
<p>References <a class="el" href="lights_8c-source.html#l00544">orb_set()</a>.</p> |
637 |
|
638 |
</div>
|
639 |
</div><p> |
640 |
<a class="anchor" name="g5ebe8d5597e2519d82486ce0a88906cc"></a><!-- doxytag: member="lights.h::orbs_set" ref="g5ebe8d5597e2519d82486ce0a88906cc" args="(uint8_t red1, uint8_t green1, uint8_t blue1, uint8_t red2, uint8_t green2, uint8_t blue2)" --> |
641 |
<div class="memitem"> |
642 |
<div class="memproto"> |
643 |
<table class="memname"> |
644 |
<tr>
|
645 |
<td class="memname">void orbs_set </td> |
646 |
<td>(</td> |
647 |
<td class="paramtype">uint8_t </td> |
648 |
<td class="paramname"> <em>red1</em>, </td> |
649 |
</tr>
|
650 |
<tr>
|
651 |
<td class="paramkey"></td> |
652 |
<td></td> |
653 |
<td class="paramtype">uint8_t </td> |
654 |
<td class="paramname"> <em>green1</em>, </td> |
655 |
</tr>
|
656 |
<tr>
|
657 |
<td class="paramkey"></td> |
658 |
<td></td> |
659 |
<td class="paramtype">uint8_t </td> |
660 |
<td class="paramname"> <em>blue1</em>, </td> |
661 |
</tr>
|
662 |
<tr>
|
663 |
<td class="paramkey"></td> |
664 |
<td></td> |
665 |
<td class="paramtype">uint8_t </td> |
666 |
<td class="paramname"> <em>red2</em>, </td> |
667 |
</tr>
|
668 |
<tr>
|
669 |
<td class="paramkey"></td> |
670 |
<td></td> |
671 |
<td class="paramtype">uint8_t </td> |
672 |
<td class="paramname"> <em>green2</em>, </td> |
673 |
</tr>
|
674 |
<tr>
|
675 |
<td class="paramkey"></td> |
676 |
<td></td> |
677 |
<td class="paramtype">uint8_t </td> |
678 |
<td class="paramname"> <em>blue2</em></td><td> </td> |
679 |
</tr>
|
680 |
<tr>
|
681 |
<td></td> |
682 |
<td>)</td> |
683 |
<td></td><td></td><td width="100%"></td> |
684 |
</tr>
|
685 |
</table>
|
686 |
</div>
|
687 |
<div class="memdoc"> |
688 |
|
689 |
<p>
|
690 |
Set the orbs to the respective values. The orbs must be initialized before this function may be used. Note that, when setting both orbs, this function is faster than calling orb1_set and orb2_set (or orb_n_set) because the values are only sorted once.<p>
|
691 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
692 |
<table border="0" cellspacing="2" cellpadding="0"> |
693 |
<tr><td valign="top"></td><td valign="top"><em>red1</em> </td><td></td></tr> |
694 |
<tr><td valign="top"></td><td valign="top"><em>green1</em> </td><td></td></tr> |
695 |
<tr><td valign="top"></td><td valign="top"><em>blue1</em> </td><td></td></tr> |
696 |
<tr><td valign="top"></td><td valign="top"><em>red2</em> </td><td></td></tr> |
697 |
<tr><td valign="top"></td><td valign="top"><em>green2</em> </td><td></td></tr> |
698 |
<tr><td valign="top"></td><td valign="top"><em>blue2</em> </td><td></td></tr> |
699 |
</table>
|
700 |
</dl>
|
701 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g06c1b846b943bd327a2bc9f37b926497" title="Set orb1 to a specified color.">orb1_set</a> <p> |
702 |
<a class="el" href="group__orbs.html#g618af3d39cb8cd954248da295f7f234c" title="Set orb2 to a specified color.">orb2_set</a> <p> |
703 |
<a class="el" href="group__orbs.html#ge066e81a39023cf8a36efd432bb9a4ff" title="set the specified orb to a specified color">orb_n_set</a> </dd></dl> |
704 |
|
705 |
<p>References <a class="el" href="dragonfly__lib_8h-source.html#l00110">RELEASE_LOCK</a>, and <a class="el" href="dragonfly__lib_8h-source.html#l00107">REQUIRE_LOCK_OR_RETURN</a>.</p> |
706 |
|
707 |
<p>Referenced by <a class="el" href="lights_8c-source.html#l00639">orbs_set_color()</a>.</p> |
708 |
|
709 |
</div>
|
710 |
</div><p> |
711 |
<a class="anchor" name="g39224c46d5ed891d16e08239c959a8a8"></a><!-- doxytag: member="lights.h::orbs_set_color" ref="g39224c46d5ed891d16e08239c959a8a8" args="(uint8_t col1, uint8_t col2)" --> |
712 |
<div class="memitem"> |
713 |
<div class="memproto"> |
714 |
<table class="memname"> |
715 |
<tr>
|
716 |
<td class="memname">void orbs_set_color </td> |
717 |
<td>(</td> |
718 |
<td class="paramtype">uint8_t </td> |
719 |
<td class="paramname"> <em>col1</em>, </td> |
720 |
</tr>
|
721 |
<tr>
|
722 |
<td class="paramkey"></td> |
723 |
<td></td> |
724 |
<td class="paramtype">uint8_t </td> |
725 |
<td class="paramname"> <em>col2</em></td><td> </td> |
726 |
</tr>
|
727 |
<tr>
|
728 |
<td></td> |
729 |
<td>)</td> |
730 |
<td></td><td></td><td width="100%"></td> |
731 |
</tr>
|
732 |
</table>
|
733 |
</div>
|
734 |
<div class="memdoc"> |
735 |
|
736 |
<p>
|
737 |
set the orbs to specified colors |
738 |
<p>
|
739 |
Set the orbs to the respective color. This function is intended to be used with the predefined colors.<p>
|
740 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
741 |
<table border="0" cellspacing="2" cellpadding="0"> |
742 |
<tr><td valign="top"></td><td valign="top"><em>col1</em> </td><td>the color to set orb 1 to </td></tr> |
743 |
<tr><td valign="top"></td><td valign="top"><em>col2</em> </td><td>the color to set orb 2 to </td></tr> |
744 |
</table>
|
745 |
</dl>
|
746 |
|
747 |
<p>References <a class="el" href="lights_8c-source.html#l00569">orbs_set()</a>.</p> |
748 |
|
749 |
</div>
|
750 |
</div><p> |
751 |
</div>
|
752 |
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 18:33:23 2009 for libdragonfly by |
753 |
<a href="http://www.doxygen.org/index.html"> |
754 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> |
755 |
</body>
|
756 |
</html>
|