Project

General

Profile

Revision 1145

Generated documentation for new orbs code

View differences:

group__orbs.html
4 4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5 5
<link href="tabs.css" rel="stylesheet" type="text/css">
6 6
</head><body>
7
<!-- Generated by Doxygen 1.5.3 -->
8
<div class="tabs">
9
  <ul>
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
    <li><a href="modules.html"><span>Modules</span></a></li>
12
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
13
    <li><a href="files.html"><span>Files</span></a></li>
14
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
15
  </ul>
7
<!-- Generated by Doxygen 1.5.5 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13
      <li><a href="modules.html"><span>Modules</span></a></li>
14
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15
      <li><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
16 18
</div>
17
<h1>Orbs</h1>Functions for controlling the color of the orbs.  
18
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
19
<div class="contents">
20
<h1>Orbs</h1><table border="0" cellpadding="0" cellspacing="0">
19 21
<tr><td></td></tr>
20 22
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
21 23
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g8d23feea868a983c8c2b661e1e16972f"></a><!-- doxytag: member="orbs::RED" ref="g8d23feea868a983c8c2b661e1e16972f" args="" -->
......
63 65

  
64 66
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">White. <br></td></tr>
65 67
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcf2f6da92d895ef5e594223f1e39e4b1"></a><!-- doxytag: member="orbs::ORB_OFF" ref="gcf2f6da92d895ef5e594223f1e39e4b1" args="" -->
66
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gcf2f6da92d895ef5e594223f1e39e4b1">ORB_OFF</a>&nbsp;&nbsp;&nbsp;0xFE</td></tr>
68
#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>
67 69

  
68
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Turn the orb off (White). <br></td></tr>
70
<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

  
69 82
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
70 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>
71 84

  
72
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables the orbs.  <a href="#g13069271f9d636674e9b4a8a355099b9"></a><br></td></tr>
73
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#ga75385bd1398949615ee1fe78a535cff">orb_set</a> (unsigned char red_led, unsigned char green_led, unsigned char blue_led)</td></tr>
85
<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>
74 87

  
75
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set both orbs to a specified color.  <a href="#ga75385bd1398949615ee1fe78a535cff"></a><br></td></tr>
76
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g2df1397345a557295b12e50451f8592e">orb1_set</a> (unsigned char red_led, unsigned char green_led, unsigned char blue_led)</td></tr>
88
<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>
77 90

  
78
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set orb1 to a specified color.  <a href="#g2df1397345a557295b12e50451f8592e"></a><br></td></tr>
79
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#gb19679987f51d6ed35461d581ca8972b">orb2_set</a> (unsigned char red_led, unsigned char green_led, unsigned char blue_led)</td></tr>
91
<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>
80 94

  
81
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set orb2 to a specified color.  <a href="#gb19679987f51d6ed35461d581ca8972b"></a><br></td></tr>
82
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g123d2880d20bf6d0bb387024c8f6da81">orb_set_color</a> (int col)</td></tr>
95
<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>
83 97

  
84
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set both orbs to a specified color.  <a href="#g123d2880d20bf6d0bb387024c8f6da81"></a><br></td></tr>
85
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g131d9bf3e32cf5530f4cc671ea496609">orb1_set_color</a> (int col)</td></tr>
98
<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>
86 100

  
87
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set orb1 to a specified color.  <a href="#g131d9bf3e32cf5530f4cc671ea496609"></a><br></td></tr>
88
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g3125d9c661a33b3fdeb4eca75ca00cab">orb2_set_color</a> (int col)</td></tr>
101
<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>
89 103

  
90
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set orb2 to a specified color.  <a href="#g3125d9c661a33b3fdeb4eca75ca00cab"></a><br></td></tr>
91
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g1ea1b363a0592f80798f6a1e260a70e9">orb_disable</a> (void)</td></tr>
104
<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>
92 106

  
93
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disable the orbs.  <a href="#g1ea1b363a0592f80798f6a1e260a70e9"></a><br></td></tr>
94
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__orbs.html#g5911e3fa322de2e760a92a44d5a6a547">orb_enable</a> (void)</td></tr>
107
<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>
95 109

  
96
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable the orbs.  <a href="#g5911e3fa322de2e760a92a44d5a6a547"></a><br></td></tr>
110
<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>
97 131
</table>
98 132
<hr><a name="_details"></a><h2>Detailed Description</h2>
99
Functions for controlling the color of the orbs. 
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&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>
100 142
<p>
101
Functions for controlling the color and lighting of the orbs. <hr><h2>Function Documentation</h2>
102
<a class="anchor" name="g2df1397345a557295b12e50451f8592e"></a><!-- doxytag: member="lights.c::orb1_set" ref="g2df1397345a557295b12e50451f8592e" args="(unsigned char red_led, unsigned char green_led, unsigned char blue_led)" -->
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): &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="" -->
103 155
<div class="memitem">
104 156
<div class="memproto">
105 157
      <table class="memname">
106 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>
107 175
          <td class="memname">void orb1_set           </td>
108 176
          <td>(</td>
109
          <td class="paramtype">unsigned char&nbsp;</td>
110
          <td class="paramname"> <em>red_led</em>, </td>
177
          <td class="paramtype">uint8_t&nbsp;</td>
178
          <td class="paramname"> <em>red</em>, </td>
111 179
        </tr>
112 180
        <tr>
113 181
          <td class="paramkey"></td>
114 182
          <td></td>
115
          <td class="paramtype">unsigned char&nbsp;</td>
116
          <td class="paramname"> <em>green_led</em>, </td>
183
          <td class="paramtype">uint8_t&nbsp;</td>
184
          <td class="paramname"> <em>green</em>, </td>
117 185
        </tr>
118 186
        <tr>
119 187
          <td class="paramkey"></td>
120 188
          <td></td>
121
          <td class="paramtype">unsigned char&nbsp;</td>
122
          <td class="paramname"> <em>blue_led</em></td><td>&nbsp;</td>
189
          <td class="paramtype">uint8_t&nbsp;</td>
190
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
123 191
        </tr>
124 192
        <tr>
125 193
          <td></td>
......
133 201
<p>
134 202
Set orb1 to a specified color. 
135 203
<p>
136
Set orb1 to the color specified. orb_init must be called before this function may be used.<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>
137 205
<dl compact><dt><b>Parameters:</b></dt><dd>
138 206
  <table border="0" cellspacing="2" cellpadding="0">
139
    <tr><td valign="top"></td><td valign="top"><em>red_led</em>&nbsp;</td><td>the red component of the color </td></tr>
140
    <tr><td valign="top"></td><td valign="top"><em>green_led</em>&nbsp;</td><td>the green component of the color </td></tr>
141
    <tr><td valign="top"></td><td valign="top"><em>blue_led</em>&nbsp;</td><td>the blue component of the color</td></tr>
207
    <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>
142 210
  </table>
143 211
</dl>
144
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></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>
145 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

  
146 218
</div>
147 219
</div><p>
148
<a class="anchor" name="g131d9bf3e32cf5530f4cc671ea496609"></a><!-- doxytag: member="lights.c::orb1_set_color" ref="g131d9bf3e32cf5530f4cc671ea496609" args="(int col)" -->
220
<a class="anchor" name="g0dede06855e46c8b8abdbce5779917ba"></a><!-- doxytag: member="lights.h::orb1_set_color" ref="g0dede06855e46c8b8abdbce5779917ba" args="(uint8_t col)" -->
149 221
<div class="memitem">
150 222
<div class="memproto">
151 223
      <table class="memname">
152 224
        <tr>
153 225
          <td class="memname">void orb1_set_color           </td>
154 226
          <td>(</td>
155
          <td class="paramtype">int&nbsp;</td>
227
          <td class="paramtype">uint8_t&nbsp;</td>
156 228
          <td class="paramname"> <em>col</em>          </td>
157 229
          <td>&nbsp;)&nbsp;</td>
158 230
          <td width="100%"></td>
......
164 236
<p>
165 237
Set orb1 to a specified color. 
166 238
<p>
167
Set orb1 to the specified color. This function is intended to be used with the predefined colors. orb_init must be called before this function may be used.<p>
239
Set orb1 to the specified color. This function is intended to be used with the predefined colors.<p>
168 240
<dl compact><dt><b>Parameters:</b></dt><dd>
169 241
  <table border="0" cellspacing="2" cellpadding="0">
170
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to</td></tr>
242
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
171 243
  </table>
172 244
</dl>
173
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></dl>
174 245

  
246
<p>References <a class="el" href="lights_8c-source.html#l00506">orb1_set()</a>.</p>
247

  
175 248
</div>
176 249
</div><p>
177
<a class="anchor" name="gb19679987f51d6ed35461d581ca8972b"></a><!-- doxytag: member="lights.c::orb2_set" ref="gb19679987f51d6ed35461d581ca8972b" args="(unsigned char red_led, unsigned char green_led, unsigned char blue_led)" -->
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)" -->
178 251
<div class="memitem">
179 252
<div class="memproto">
180 253
      <table class="memname">
181 254
        <tr>
182 255
          <td class="memname">void orb2_set           </td>
183 256
          <td>(</td>
184
          <td class="paramtype">unsigned char&nbsp;</td>
185
          <td class="paramname"> <em>red_led</em>, </td>
257
          <td class="paramtype">uint8_t&nbsp;</td>
258
          <td class="paramname"> <em>red</em>, </td>
186 259
        </tr>
187 260
        <tr>
188 261
          <td class="paramkey"></td>
189 262
          <td></td>
190
          <td class="paramtype">unsigned char&nbsp;</td>
191
          <td class="paramname"> <em>green_led</em>, </td>
263
          <td class="paramtype">uint8_t&nbsp;</td>
264
          <td class="paramname"> <em>green</em>, </td>
192 265
        </tr>
193 266
        <tr>
194 267
          <td class="paramkey"></td>
195 268
          <td></td>
196
          <td class="paramtype">unsigned char&nbsp;</td>
197
          <td class="paramname"> <em>blue_led</em></td><td>&nbsp;</td>
269
          <td class="paramtype">uint8_t&nbsp;</td>
270
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
198 271
        </tr>
199 272
        <tr>
200 273
          <td></td>
......
208 281
<p>
209 282
Set orb2 to a specified color. 
210 283
<p>
211
Set orb2 to the color specified. orb_init must be called before this function may be used.<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>
212 285
<dl compact><dt><b>Parameters:</b></dt><dd>
213 286
  <table border="0" cellspacing="2" cellpadding="0">
214 287
    <tr><td valign="top"></td><td valign="top"><em>red_led</em>&nbsp;</td><td>the red component of the color </td></tr>
......
216 289
    <tr><td valign="top"></td><td valign="top"><em>blue_led</em>&nbsp;</td><td>the blue component of the color</td></tr>
217 290
  </table>
218 291
</dl>
219
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></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>
220 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

  
221 298
</div>
222 299
</div><p>
223
<a class="anchor" name="g3125d9c661a33b3fdeb4eca75ca00cab"></a><!-- doxytag: member="lights.c::orb2_set_color" ref="g3125d9c661a33b3fdeb4eca75ca00cab" args="(int col)" -->
300
<a class="anchor" name="g1eb5f3accec23e5a2ea137e95f5070d6"></a><!-- doxytag: member="lights.h::orb2_set_color" ref="g1eb5f3accec23e5a2ea137e95f5070d6" args="(uint8_t col)" -->
224 301
<div class="memitem">
225 302
<div class="memproto">
226 303
      <table class="memname">
227 304
        <tr>
228 305
          <td class="memname">void orb2_set_color           </td>
229 306
          <td>(</td>
230
          <td class="paramtype">int&nbsp;</td>
307
          <td class="paramtype">uint8_t&nbsp;</td>
231 308
          <td class="paramname"> <em>col</em>          </td>
232 309
          <td>&nbsp;)&nbsp;</td>
233 310
          <td width="100%"></td>
......
239 316
<p>
240 317
Set orb2 to a specified color. 
241 318
<p>
242
Set orb2 to the specified color. This function is intended to be used with the predefined colors. orb_init must be called before this function may be used.<p>
319
Set orb2 to the specified color. This function is intended to be used with the predefined colors.<p>
243 320
<dl compact><dt><b>Parameters:</b></dt><dd>
244 321
  <table border="0" cellspacing="2" cellpadding="0">
245
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to</td></tr>
322
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
246 323
  </table>
247 324
</dl>
248
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></dl>
249 325

  
326
<p>References <a class="el" href="lights_8c-source.html#l00526">orb2_set()</a>.</p>
327

  
250 328
</div>
251 329
</div><p>
252
<a class="anchor" name="g1ea1b363a0592f80798f6a1e260a70e9"></a><!-- doxytag: member="lights.c::orb_disable" ref="g1ea1b363a0592f80798f6a1e260a70e9" args="(void)" -->
330
<a class="anchor" name="gf4effc092e3f85d937cea0ff72a003bf"></a><!-- doxytag: member="lights.h::orb_disable_timer" ref="gf4effc092e3f85d937cea0ff72a003bf" args="(void)" -->
253 331
<div class="memitem">
254 332
<div class="memproto">
255 333
      <table class="memname">
256 334
        <tr>
257
          <td class="memname">void orb_disable           </td>
335
          <td class="memname">void orb_disable_timer           </td>
258 336
          <td>(</td>
337
          <td class="paramtype">void&nbsp;</td>
259 338
          <td class="paramname">          </td>
260 339
          <td>&nbsp;)&nbsp;</td>
261 340
          <td width="100%"></td>
......
265 344
<div class="memdoc">
266 345

  
267 346
<p>
268
Disable the orbs. 
347
Disables the orb timer, but does not change the mode. 
269 348
<p>
270
Disables the orb color fading capabilities by disabling the timer1 interrupt.<p>
271
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></dl>
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>
272 350

  
351
<p>Referenced by <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p>
352

  
273 353
</div>
274 354
</div><p>
275
<a class="anchor" name="g5911e3fa322de2e760a92a44d5a6a547"></a><!-- doxytag: member="lights.c::orb_enable" ref="g5911e3fa322de2e760a92a44d5a6a547" args="(void)" -->
355
<a class="anchor" name="ge626892624d9bd87fa7dcd0ebd6d19f3"></a><!-- doxytag: member="lights.h::orb_enable_timer" ref="ge626892624d9bd87fa7dcd0ebd6d19f3" args="(void)" -->
276 356
<div class="memitem">
277 357
<div class="memproto">
278 358
      <table class="memname">
279 359
        <tr>
280
          <td class="memname">void orb_enable           </td>
360
          <td class="memname">void orb_enable_timer           </td>
281 361
          <td>(</td>
362
          <td class="paramtype">void&nbsp;</td>
282 363
          <td class="paramname">          </td>
283 364
          <td>&nbsp;)&nbsp;</td>
284 365
          <td width="100%"></td>
......
288 369
<div class="memdoc">
289 370

  
290 371
<p>
291
Enable the orbs. 
372
Enables the orb timer, but does not change the mode. 
292 373
<p>
293
Enables the orb's color fading capabilities.<p>
294
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></dl>
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>
295 375

  
376
<p>Referenced by <a class="el" href="lights_8c-source.html#l00693">orb_set_mode()</a>.</p>
377

  
296 378
</div>
297 379
</div><p>
298
<a class="anchor" name="g13069271f9d636674e9b4a8a355099b9"></a><!-- doxytag: member="lights.c::orb_init" ref="g13069271f9d636674e9b4a8a355099b9" args="(void)" -->
380
<a class="anchor" name="g13069271f9d636674e9b4a8a355099b9"></a><!-- doxytag: member="lights.h::orb_init" ref="g13069271f9d636674e9b4a8a355099b9" args="(void)" -->
299 381
<div class="memitem">
300 382
<div class="memproto">
301 383
      <table class="memname">
302 384
        <tr>
303 385
          <td class="memname">void orb_init           </td>
304 386
          <td>(</td>
387
          <td class="paramtype">void&nbsp;</td>
305 388
          <td class="paramname">          </td>
306 389
          <td>&nbsp;)&nbsp;</td>
307 390
          <td width="100%"></td>
......
311 394
<div class="memdoc">
312 395

  
313 396
<p>
314
Enables the orbs. 
397
Enables the orbs in default mode. 
315 398
<p>
316
Initializes the PWM for Orb control. This must be called before the orbs are used for them to function. 
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

  
317 407
</div>
318 408
</div><p>
319
<a class="anchor" name="ga75385bd1398949615ee1fe78a535cff"></a><!-- doxytag: member="lights.c::orb_set" ref="ga75385bd1398949615ee1fe78a535cff" args="(unsigned char red_led, unsigned char green_led, unsigned char blue_led)" -->
409
<a class="anchor" name="g55a2b60caf9fe91346bed89c7bba73b7"></a><!-- doxytag: member="lights.h::orb_init_binary" ref="g55a2b60caf9fe91346bed89c7bba73b7" args="(void)" -->
320 410
<div class="memitem">
321 411
<div class="memproto">
322 412
      <table class="memname">
323 413
        <tr>
414
          <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
          <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&nbsp;</td>
443
          <td class="paramname">          </td>
444
          <td>&nbsp;)&nbsp;</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&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
          <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>&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
<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&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
          <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>&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
<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>
324 565
          <td class="memname">void orb_set           </td>
325 566
          <td>(</td>
326
          <td class="paramtype">unsigned char&nbsp;</td>
327
          <td class="paramname"> <em>red_led</em>, </td>
567
          <td class="paramtype">uint8_t&nbsp;</td>
568
          <td class="paramname"> <em>red</em>, </td>
328 569
        </tr>
329 570
        <tr>
330 571
          <td class="paramkey"></td>
331 572
          <td></td>
332
          <td class="paramtype">unsigned char&nbsp;</td>
333
          <td class="paramname"> <em>green_led</em>, </td>
573
          <td class="paramtype">uint8_t&nbsp;</td>
574
          <td class="paramname"> <em>green</em>, </td>
334 575
        </tr>
335 576
        <tr>
336 577
          <td class="paramkey"></td>
337 578
          <td></td>
338
          <td class="paramtype">unsigned char&nbsp;</td>
339
          <td class="paramname"> <em>blue_led</em></td><td>&nbsp;</td>
579
          <td class="paramtype">uint8_t&nbsp;</td>
580
          <td class="paramname"> <em>blue</em></td><td>&nbsp;</td>
340 581
        </tr>
341 582
        <tr>
342 583
          <td></td>
......
350 591
<p>
351 592
Set both orbs to a specified color. 
352 593
<p>
353
Set both orbs to the color specified. orb_init must be called before this function may be used.<p>
594
Set both orbs to the color specified. The orbs must be initialized before this function may be used.<p>
354 595
<dl compact><dt><b>Parameters:</b></dt><dd>
355 596
  <table border="0" cellspacing="2" cellpadding="0">
356 597
    <tr><td valign="top"></td><td valign="top"><em>red_led</em>&nbsp;</td><td>the red component of the color </td></tr>
......
358 599
    <tr><td valign="top"></td><td valign="top"><em>blue_led</em>&nbsp;</td><td>the blue component of the color</td></tr>
359 600
  </table>
360 601
</dl>
361
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></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>
362 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

  
363 608
</div>
364 609
</div><p>
365
<a class="anchor" name="g123d2880d20bf6d0bb387024c8f6da81"></a><!-- doxytag: member="lights.c::orb_set_color" ref="g123d2880d20bf6d0bb387024c8f6da81" args="(int col)" -->
610
<a class="anchor" name="g1710247e5331a3cb6076354a70e095e1"></a><!-- doxytag: member="lights.h::orb_set_color" ref="g1710247e5331a3cb6076354a70e095e1" args="(uint8_t col)" -->
366 611
<div class="memitem">
367 612
<div class="memproto">
368 613
      <table class="memname">
369 614
        <tr>
370 615
          <td class="memname">void orb_set_color           </td>
371 616
          <td>(</td>
372
          <td class="paramtype">int&nbsp;</td>
617
          <td class="paramtype">uint8_t&nbsp;</td>
373 618
          <td class="paramname"> <em>col</em>          </td>
374 619
          <td>&nbsp;)&nbsp;</td>
375 620
          <td width="100%"></td>
......
381 626
<p>
382 627
Set both orbs to a specified color. 
383 628
<p>
384
Set both orbs to the specified color. This function is intended to be used with the predefined colors. orb_init must be called before this function may be used.<p>
629
Set both orbs to the specified color. This function is intended to be used with the predefined colors.<p>
385 630
<dl compact><dt><b>Parameters:</b></dt><dd>
386 631
  <table border="0" cellspacing="2" cellpadding="0">
387
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to</td></tr>
632
    <tr><td valign="top"></td><td valign="top"><em>col</em>&nbsp;</td><td>the color to set the orbs to </td></tr>
388 633
  </table>
389 634
</dl>
390
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__orbs.html#g13069271f9d636674e9b4a8a355099b9" title="Enables the orbs.">orb_init</a> </dd></dl>
391 635

  
636
<p>References <a class="el" href="lights_8c-source.html#l00544">orb_set()</a>.</p>
637

  
392 638
</div>
393 639
</div><p>
394
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 5 19:59:43 2008 for libdragonfly by&nbsp;
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&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
          <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>&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
<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&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
          <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>&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
<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&nbsp;
395 753
<a href="http://www.doxygen.org/index.html">
396
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
754
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
397 755
</body>
398 756
</html>

Also available in: Unified diff