Project

General

Profile

Statistics
| Revision:

root / trunk / docs / libdragonfly / group__orbs.html @ 1485

History | View | Annotate | Download (43 KB)

1 41 bcoltin
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 241 bcoltin
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 41 bcoltin
<title>libdragonfly: Orbs</title>
4 1398 cmar
<link href="tabs.css" rel="stylesheet" type="text/css">
5 41 bcoltin
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
</head><body>
7 1398 cmar
<!-- Generated by Doxygen 1.5.9 -->
8 1145 deffi
<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><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
18 241 bcoltin
</div>
19 1145 deffi
<div class="contents">
20
<h1>Orbs</h1><table border="0" cellpadding="0" cellspacing="0">
21 41 bcoltin
<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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g8d23feea868a983c8c2b661e1e16972f">RED</a>&nbsp;&nbsp;&nbsp;0xE0</td></tr>
25
26
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gc5b6e19bf06822021f35602c59658de3">ORANGE</a>&nbsp;&nbsp;&nbsp;0xE4</td></tr>
29
30
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gbf681265909adf3d3e8116c93c0ba179">YELLOW</a>&nbsp;&nbsp;&nbsp;0xE8</td></tr>
33
34
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g46019a1f2c10603a54b6cbb19cbf3c21">LIME</a>&nbsp;&nbsp;&nbsp;0x68</td></tr>
37
38
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gcfbc006ea433ad708fdee3e82996e721">GREEN</a>&nbsp;&nbsp;&nbsp;0x1C</td></tr>
41
42
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gd243f93c16bc4c1d3e0a13b84421d760">CYAN</a>&nbsp;&nbsp;&nbsp;0x1F</td></tr>
45
46
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g79d10e672abb49ad63eeaa8aaef57c38">BLUE</a>&nbsp;&nbsp;&nbsp;0x03</td></tr>
49
50
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gda419fe3b48fcf19daed7cc57ccf1174">PINK</a>&nbsp;&nbsp;&nbsp;0xA6</td></tr>
53
54
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g0bb0b009e7a7390473ace4d98bd843c0">PURPLE</a>&nbsp;&nbsp;&nbsp;0x41</td></tr>
57
58
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g6f699060902f800f12aaae150f3a708e">MAGENTA</a>&nbsp;&nbsp;&nbsp;0xE3</td></tr>
61
62
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g87b537f5fa5c109d3c05c13d6b18f382">WHITE</a>&nbsp;&nbsp;&nbsp;0xFE</td></tr>
65
66
<tr><td class="mdescLeft">&nbsp;</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 1145 deffi
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gcf2f6da92d895ef5e594223f1e39e4b1">ORB_OFF</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
69 41 bcoltin
70 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gc443bd65dba694ea9731f3ea455831a8">orb_mode_pwm</a>&nbsp;&nbsp;&nbsp;0</td></tr>
73
74
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gf6cc675aa67ca9348717db3e53f18ae9">orb_mode_binary</a>&nbsp;&nbsp;&nbsp;1</td></tr>
77
78
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ge1444a97f794787d7ffaa5ec12e2a1e2">orb_mode_t</a></td></tr>
81
82 41 bcoltin
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
83
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9">orb_init</a> (void)</td></tr>
84
85 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g55a2b60caf9fe91346bed89c7bba73b7">orb_init_binary</a> (void)</td></tr>
87 41 bcoltin
88 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gbb9bc432db2639616a7e8b3211544891">orb_init_pwm</a> (void)</td></tr>
90 41 bcoltin
91 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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 41 bcoltin
95 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gf4effc092e3f85d937cea0ff72a003bf">orb_disable_timer</a> (void)</td></tr>
97 41 bcoltin
98 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ge626892624d9bd87fa7dcd0ebd6d19f3">orb_enable_timer</a> (void)</td></tr>
100 41 bcoltin
101 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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 41 bcoltin
104 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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 41 bcoltin
107 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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 41 bcoltin
110 1145 deffi
<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</td><td class="mdescRight">Set both orbs to a specified color.  <a href="#g1710247e5331a3cb6076354a70e095e1"></a><br></td></tr>
131 41 bcoltin
</table>
132
<hr><a name="_details"></a><h2>Detailed Description</h2>
133 1145 deffi
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&gt;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 41 bcoltin
<p>
143 1145 deffi
<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): &lt;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&lt;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 241 bcoltin
<div class="memitem">
156
<div class="memproto">
157
      <table class="memname">
158 41 bcoltin
        <tr>
159 1145 deffi
          <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 241 bcoltin
          <td class="memname">void orb1_set           </td>
176
          <td>(</td>
177 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
178
          <td class="paramname"> <em>red</em>, </td>
179 41 bcoltin
        </tr>
180
        <tr>
181 241 bcoltin
          <td class="paramkey"></td>
182
          <td></td>
183 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
184
          <td class="paramname"> <em>green</em>, </td>
185 41 bcoltin
        </tr>
186
        <tr>
187 241 bcoltin
          <td class="paramkey"></td>
188
          <td></td>
189 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
190
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
191 41 bcoltin
        </tr>
192
        <tr>
193 241 bcoltin
          <td></td>
194
          <td>)</td>
195 1398 cmar
          <td></td><td></td><td></td>
196 41 bcoltin
        </tr>
197
      </table>
198 241 bcoltin
</div>
199
<div class="memdoc">
200 41 bcoltin
201
<p>
202
Set orb1 to a specified color.
203
<p>
204 1145 deffi
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 41 bcoltin
<dl compact><dt><b>Parameters:</b></dt><dd>
206
  <table border="0" cellspacing="2" cellpadding="0">
207 1145 deffi
    <tr><td valign="top"></td><td valign="top"><em>red</em>&nbsp;</td><td>the red component of the color </td></tr>
208
    <tr><td valign="top"></td><td valign="top"><em>green</em>&nbsp;</td><td>the green component of the color </td></tr>
209
    <tr><td valign="top"></td><td valign="top"><em>blue</em>&nbsp;</td><td>the blue component of the color</td></tr>
210 41 bcoltin
  </table>
211
</dl>
212 1145 deffi
<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 241 bcoltin
214 1398 cmar
<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 1145 deffi
216 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00611">orb1_set_color()</a>.</p>
217 1145 deffi
218 241 bcoltin
</div>
219
</div><p>
220 1145 deffi
<a class="anchor" name="g0dede06855e46c8b8abdbce5779917ba"></a><!-- doxytag: member="lights.h::orb1_set_color" ref="g0dede06855e46c8b8abdbce5779917ba" args="(uint8_t col)" -->
221 241 bcoltin
<div class="memitem">
222
<div class="memproto">
223
      <table class="memname">
224 41 bcoltin
        <tr>
225 241 bcoltin
          <td class="memname">void orb1_set_color           </td>
226
          <td>(</td>
227 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
228 241 bcoltin
          <td class="paramname"> <em>col</em>          </td>
229
          <td>&nbsp;)&nbsp;</td>
230 1398 cmar
          <td></td>
231 41 bcoltin
        </tr>
232
      </table>
233 241 bcoltin
</div>
234
<div class="memdoc">
235 41 bcoltin
236
<p>
237
Set orb1 to a specified color.
238
<p>
239 1145 deffi
Set orb1 to the specified color. This function is intended to be used with the predefined colors.<p>
240 41 bcoltin
<dl compact><dt><b>Parameters:</b></dt><dd>
241
  <table border="0" cellspacing="2" cellpadding="0">
242 1145 deffi
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
243 41 bcoltin
  </table>
244
</dl>
245 241 bcoltin
246 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00506">orb1_set()</a>.</p>
247 1145 deffi
248 241 bcoltin
</div>
249
</div><p>
250 1145 deffi
<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 241 bcoltin
<div class="memitem">
252
<div class="memproto">
253
      <table class="memname">
254 41 bcoltin
        <tr>
255 241 bcoltin
          <td class="memname">void orb2_set           </td>
256
          <td>(</td>
257 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
258
          <td class="paramname"> <em>red</em>, </td>
259 41 bcoltin
        </tr>
260
        <tr>
261 241 bcoltin
          <td class="paramkey"></td>
262
          <td></td>
263 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
264
          <td class="paramname"> <em>green</em>, </td>
265 41 bcoltin
        </tr>
266
        <tr>
267 241 bcoltin
          <td class="paramkey"></td>
268
          <td></td>
269 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
270
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
271 41 bcoltin
        </tr>
272
        <tr>
273 241 bcoltin
          <td></td>
274
          <td>)</td>
275 1398 cmar
          <td></td><td></td><td></td>
276 41 bcoltin
        </tr>
277
      </table>
278 241 bcoltin
</div>
279
<div class="memdoc">
280 41 bcoltin
281
<p>
282
Set orb2 to a specified color.
283
<p>
284 1145 deffi
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 41 bcoltin
<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>&nbsp;</td><td>the red component of the color </td></tr>
288
    <tr><td valign="top"></td><td valign="top"><em>green_led</em>&nbsp;</td><td>the green component of the color </td></tr>
289
    <tr><td valign="top"></td><td valign="top"><em>blue_led</em>&nbsp;</td><td>the blue component of the color</td></tr>
290
  </table>
291
</dl>
292 1145 deffi
<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 241 bcoltin
294 1398 cmar
<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 1145 deffi
296 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00620">orb2_set_color()</a>.</p>
297 1145 deffi
298 241 bcoltin
</div>
299
</div><p>
300 1145 deffi
<a class="anchor" name="g1eb5f3accec23e5a2ea137e95f5070d6"></a><!-- doxytag: member="lights.h::orb2_set_color" ref="g1eb5f3accec23e5a2ea137e95f5070d6" args="(uint8_t col)" -->
301 241 bcoltin
<div class="memitem">
302
<div class="memproto">
303
      <table class="memname">
304 41 bcoltin
        <tr>
305 241 bcoltin
          <td class="memname">void orb2_set_color           </td>
306
          <td>(</td>
307 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
308 241 bcoltin
          <td class="paramname"> <em>col</em>          </td>
309
          <td>&nbsp;)&nbsp;</td>
310 1398 cmar
          <td></td>
311 41 bcoltin
        </tr>
312
      </table>
313 241 bcoltin
</div>
314
<div class="memdoc">
315 41 bcoltin
316
<p>
317
Set orb2 to a specified color.
318
<p>
319 1145 deffi
Set orb2 to the specified color. This function is intended to be used with the predefined colors.<p>
320 41 bcoltin
<dl compact><dt><b>Parameters:</b></dt><dd>
321
  <table border="0" cellspacing="2" cellpadding="0">
322 1145 deffi
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
323 41 bcoltin
  </table>
324
</dl>
325 241 bcoltin
326 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00526">orb2_set()</a>.</p>
327 1145 deffi
328 241 bcoltin
</div>
329
</div><p>
330 1145 deffi
<a class="anchor" name="gf4effc092e3f85d937cea0ff72a003bf"></a><!-- doxytag: member="lights.h::orb_disable_timer" ref="gf4effc092e3f85d937cea0ff72a003bf" args="(void)" -->
331 241 bcoltin
<div class="memitem">
332
<div class="memproto">
333
      <table class="memname">
334 41 bcoltin
        <tr>
335 1145 deffi
          <td class="memname">void orb_disable_timer           </td>
336 241 bcoltin
          <td>(</td>
337 1145 deffi
          <td class="paramtype">void&nbsp;</td>
338 241 bcoltin
          <td class="paramname">          </td>
339
          <td>&nbsp;)&nbsp;</td>
340 1398 cmar
          <td></td>
341 41 bcoltin
        </tr>
342
      </table>
343 241 bcoltin
</div>
344
<div class="memdoc">
345 41 bcoltin
346
<p>
347 1145 deffi
Disables the orb timer, but does not change the mode.
348 41 bcoltin
<p>
349 1145 deffi
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 241 bcoltin
351 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00693">orb_set_mode()</a>.</p>
352 1145 deffi
353 241 bcoltin
</div>
354
</div><p>
355 1145 deffi
<a class="anchor" name="ge626892624d9bd87fa7dcd0ebd6d19f3"></a><!-- doxytag: member="lights.h::orb_enable_timer" ref="ge626892624d9bd87fa7dcd0ebd6d19f3" args="(void)" -->
356 241 bcoltin
<div class="memitem">
357
<div class="memproto">
358
      <table class="memname">
359 41 bcoltin
        <tr>
360 1145 deffi
          <td class="memname">void orb_enable_timer           </td>
361 241 bcoltin
          <td>(</td>
362 1145 deffi
          <td class="paramtype">void&nbsp;</td>
363 241 bcoltin
          <td class="paramname">          </td>
364
          <td>&nbsp;)&nbsp;</td>
365 1398 cmar
          <td></td>
366 41 bcoltin
        </tr>
367
      </table>
368 241 bcoltin
</div>
369
<div class="memdoc">
370 41 bcoltin
371
<p>
372 1145 deffi
Enables the orb timer, but does not change the mode.
373 41 bcoltin
<p>
374 1145 deffi
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 241 bcoltin
376 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00693">orb_set_mode()</a>.</p>
377 1145 deffi
378 241 bcoltin
</div>
379
</div><p>
380 1145 deffi
<a class="anchor" name="g13069271f9d636674e9b4a8a355099b9"></a><!-- doxytag: member="lights.h::orb_init" ref="g13069271f9d636674e9b4a8a355099b9" args="(void)" -->
381 241 bcoltin
<div class="memitem">
382
<div class="memproto">
383
      <table class="memname">
384 41 bcoltin
        <tr>
385 241 bcoltin
          <td class="memname">void orb_init           </td>
386
          <td>(</td>
387 1145 deffi
          <td class="paramtype">void&nbsp;</td>
388 241 bcoltin
          <td class="paramname">          </td>
389
          <td>&nbsp;)&nbsp;</td>
390 1398 cmar
          <td></td>
391 41 bcoltin
        </tr>
392
      </table>
393 241 bcoltin
</div>
394
<div class="memdoc">
395 41 bcoltin
396
<p>
397 1145 deffi
Enables the orbs in default mode.
398 41 bcoltin
<p>
399 1145 deffi
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 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00743">orb_init_pwm()</a>.</p>
404 1145 deffi
405 1398 cmar
<p>Referenced by <a class="el" href="dragonfly__lib_8c_source.html#l00068">dragonfly_init()</a>.</p>
406 1145 deffi
407 241 bcoltin
</div>
408
</div><p>
409 1145 deffi
<a class="anchor" name="g55a2b60caf9fe91346bed89c7bba73b7"></a><!-- doxytag: member="lights.h::orb_init_binary" ref="g55a2b60caf9fe91346bed89c7bba73b7" args="(void)" -->
410 241 bcoltin
<div class="memitem">
411
<div class="memproto">
412
      <table class="memname">
413 41 bcoltin
        <tr>
414 1145 deffi
          <td class="memname">void orb_init_binary           </td>
415
          <td>(</td>
416
          <td class="paramtype">void&nbsp;</td>
417
          <td class="paramname">          </td>
418
          <td>&nbsp;)&nbsp;</td>
419 1398 cmar
          <td></td>
420 1145 deffi
        </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 1398 cmar
<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 1145 deffi
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&nbsp;</td>
443
          <td class="paramname">          </td>
444
          <td>&nbsp;)&nbsp;</td>
445 1398 cmar
          <td></td>
446 1145 deffi
        </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 1398 cmar
<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 1145 deffi
459 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00755">orb_init()</a>.</p>
460 1145 deffi
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&nbsp;</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&nbsp;</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&nbsp;</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&nbsp;</td>
489
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
490
        </tr>
491
        <tr>
492
          <td></td>
493
          <td>)</td>
494 1398 cmar
          <td></td><td></td><td></td>
495 1145 deffi
        </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>&nbsp;</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>&nbsp;</td><td>the red value for the specified orb </td></tr>
508
    <tr><td valign="top"></td><td valign="top"><em>green</em>&nbsp;</td><td>the green value for the specified orb </td></tr>
509
    <tr><td valign="top"></td><td valign="top"><em>blue</em>&nbsp;</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 1398 cmar
<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 1145 deffi
516 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00602">orb_n_set_color()</a>.</p>
517 1145 deffi
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&nbsp;</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&nbsp;</td>
534
          <td class="paramname"> <em>col</em></td><td>&nbsp;</td>
535
        </tr>
536
        <tr>
537
          <td></td>
538
          <td>)</td>
539 1398 cmar
          <td></td><td></td><td></td>
540 1145 deffi
        </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>&nbsp;</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>&nbsp;</td><td>the color to set the orbs to </td></tr>
553
  </table>
554
</dl>
555
556 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00486">orb_n_set()</a>.</p>
557 1145 deffi
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 241 bcoltin
          <td class="memname">void orb_set           </td>
566
          <td>(</td>
567 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
568
          <td class="paramname"> <em>red</em>, </td>
569 41 bcoltin
        </tr>
570
        <tr>
571 241 bcoltin
          <td class="paramkey"></td>
572
          <td></td>
573 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
574
          <td class="paramname"> <em>green</em>, </td>
575 41 bcoltin
        </tr>
576
        <tr>
577 241 bcoltin
          <td class="paramkey"></td>
578
          <td></td>
579 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
580
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
581 41 bcoltin
        </tr>
582
        <tr>
583 241 bcoltin
          <td></td>
584
          <td>)</td>
585 1398 cmar
          <td></td><td></td><td></td>
586 41 bcoltin
        </tr>
587
      </table>
588 241 bcoltin
</div>
589
<div class="memdoc">
590 41 bcoltin
591
<p>
592
Set both orbs to a specified color.
593
<p>
594 1145 deffi
Set both orbs to the color specified. The orbs must be initialized before this function may be used.<p>
595 41 bcoltin
<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>&nbsp;</td><td>the red component of the color </td></tr>
598
    <tr><td valign="top"></td><td valign="top"><em>green_led</em>&nbsp;</td><td>the green component of the color </td></tr>
599
    <tr><td valign="top"></td><td valign="top"><em>blue_led</em>&nbsp;</td><td>the blue component of the color</td></tr>
600
  </table>
601
</dl>
602 1145 deffi
<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 241 bcoltin
604 1398 cmar
<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 1145 deffi
606 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00629">orb_set_color()</a>.</p>
607 1145 deffi
608 241 bcoltin
</div>
609
</div><p>
610 1145 deffi
<a class="anchor" name="g1710247e5331a3cb6076354a70e095e1"></a><!-- doxytag: member="lights.h::orb_set_color" ref="g1710247e5331a3cb6076354a70e095e1" args="(uint8_t col)" -->
611 241 bcoltin
<div class="memitem">
612
<div class="memproto">
613
      <table class="memname">
614 41 bcoltin
        <tr>
615 241 bcoltin
          <td class="memname">void orb_set_color           </td>
616
          <td>(</td>
617 1145 deffi
          <td class="paramtype">uint8_t&nbsp;</td>
618 241 bcoltin
          <td class="paramname"> <em>col</em>          </td>
619
          <td>&nbsp;)&nbsp;</td>
620 1398 cmar
          <td></td>
621 41 bcoltin
        </tr>
622
      </table>
623 241 bcoltin
</div>
624
<div class="memdoc">
625 41 bcoltin
626
<p>
627
Set both orbs to a specified color.
628
<p>
629 1145 deffi
Set both orbs to the specified color. This function is intended to be used with the predefined colors.<p>
630 41 bcoltin
<dl compact><dt><b>Parameters:</b></dt><dd>
631
  <table border="0" cellspacing="2" cellpadding="0">
632 1145 deffi
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
633 41 bcoltin
  </table>
634
</dl>
635 241 bcoltin
636 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00544">orb_set()</a>.</p>
637 1145 deffi
638 241 bcoltin
</div>
639
</div><p>
640 1145 deffi
<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&nbsp;</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&nbsp;</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&nbsp;</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&nbsp;</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&nbsp;</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&nbsp;</td>
678
          <td class="paramname"> <em>blue2</em></td><td>&nbsp;</td>
679
        </tr>
680
        <tr>
681
          <td></td>
682
          <td>)</td>
683 1398 cmar
          <td></td><td></td><td></td>
684 1145 deffi
        </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>&nbsp;</td><td></td></tr>
694
    <tr><td valign="top"></td><td valign="top"><em>green1</em>&nbsp;</td><td></td></tr>
695
    <tr><td valign="top"></td><td valign="top"><em>blue1</em>&nbsp;</td><td></td></tr>
696
    <tr><td valign="top"></td><td valign="top"><em>red2</em>&nbsp;</td><td></td></tr>
697
    <tr><td valign="top"></td><td valign="top"><em>green2</em>&nbsp;</td><td></td></tr>
698
    <tr><td valign="top"></td><td valign="top"><em>blue2</em>&nbsp;</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 1398 cmar
<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 1145 deffi
707 1398 cmar
<p>Referenced by <a class="el" href="lights_8c_source.html#l00639">orbs_set_color()</a>.</p>
708 1145 deffi
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&nbsp;</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&nbsp;</td>
725
          <td class="paramname"> <em>col2</em></td><td>&nbsp;</td>
726
        </tr>
727
        <tr>
728
          <td></td>
729
          <td>)</td>
730 1398 cmar
          <td></td><td></td><td></td>
731 1145 deffi
        </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>&nbsp;</td><td>the color to set orb 1 to </td></tr>
743
    <tr><td valign="top"></td><td valign="top"><em>col2</em>&nbsp;</td><td>the color to set orb 2 to </td></tr>
744
  </table>
745
</dl>
746
747 1398 cmar
<p>References <a class="el" href="lights_8c_source.html#l00569">orbs_set()</a>.</p>
748 1145 deffi
749
</div>
750
</div><p>
751
</div>
752 1398 cmar
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 7 19:07:28 2009 for libdragonfly by&nbsp;
753 41 bcoltin
<a href="http://www.doxygen.org/index.html">
754 1398 cmar
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
755 41 bcoltin
</body>
756
</html>