mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Update docs
This commit is contained in:
parent
98ff8741c0
commit
bf683c08fb
@ -651,7 +651,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -214,7 +214,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -94,291 +94,320 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<a name="l00032"></a>00032 <span class="preprocessor">#include <string.h></span>
|
||||
<a name="l00033"></a>00033 <span class="preprocessor">#include <stdlib.h></span>
|
||||
<a name="l00034"></a>00034
|
||||
<a name="l00192"></a>00192 <span class="comment">// Pins on the DMD connector board.</span>
|
||||
<a name="l00193"></a>00193 <span class="preprocessor">#define DMD_PIN_PHASE_LSB 6 // A</span>
|
||||
<a name="l00194"></a>00194 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_PHASE_MSB 7 // B</span>
|
||||
<a name="l00195"></a>00195 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_LATCH 8 // SCLK</span>
|
||||
<a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_OUTPUT_ENABLE 9 // nOE</span>
|
||||
<a name="l00197"></a>00197 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_SS SS // SPI Slave Select</span>
|
||||
<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_MOSI MOSI // SPI Master Out, Slave In (R)</span>
|
||||
<a name="l00199"></a>00199 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_MISO MISO // SPI Master In, Slave Out</span>
|
||||
<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_SCK SCK // SPI Serial Clock (CLK)</span>
|
||||
<a name="l00201"></a>00201 <span class="preprocessor"></span>
|
||||
<a name="l00202"></a>00202 <span class="comment">// Dimension information for the display.</span>
|
||||
<a name="l00203"></a>00203 <span class="preprocessor">#define DMD_NUM_COLUMNS 32 // Number of columns in a panel.</span>
|
||||
<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#define DMD_NUM_ROWS 16 // Number of rows in a panel.</span>
|
||||
<a name="l00205"></a>00205 <span class="preprocessor"></span>
|
||||
<a name="l00206"></a>00206 <span class="comment">// Refresh times.</span>
|
||||
<a name="l00207"></a>00207 <span class="preprocessor">#define DMD_REFRESH_MS 5</span>
|
||||
<a name="l00208"></a>00208 <span class="preprocessor"></span><span class="preprocessor">#define DMD_REFRESH_US 5000</span>
|
||||
<a name="l00209"></a>00209 <span class="preprocessor"></span>
|
||||
<a name="l00219"></a><a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809">00219</a> <a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809" title="Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...">DMD::DMD</a>(<span class="keywordtype">int</span> widthPanels, <span class="keywordtype">int</span> heightPanels)
|
||||
<a name="l00220"></a>00220 : <a class="code" href="classBitmap.html" title="Represents a monochrome bitmap within main memory.">Bitmap</a>(widthPanels * DMD_NUM_COLUMNS, heightPanels * DMD_NUM_ROWS)
|
||||
<a name="l00221"></a>00221 , _doubleBuffer(false)
|
||||
<a name="l00222"></a>00222 , phase(0)
|
||||
<a name="l00223"></a>00223 , fb0(0)
|
||||
<a name="l00224"></a>00224 , fb1(0)
|
||||
<a name="l00225"></a>00225 , displayfb(0)
|
||||
<a name="l00226"></a>00226 , lastRefresh(millis())
|
||||
<a name="l00227"></a>00227 {
|
||||
<a name="l00228"></a>00228 <span class="comment">// Both rendering and display are to fb0 initially.</span>
|
||||
<a name="l00229"></a>00229 fb0 = displayfb = fb;
|
||||
<a name="l00230"></a>00230
|
||||
<a name="l00231"></a>00231 <span class="comment">// Initialize SPI to MSB-first, mode 0, clock divider = 2.</span>
|
||||
<a name="l00232"></a>00232 pinMode(DMD_PIN_SPI_SCK, OUTPUT);
|
||||
<a name="l00233"></a>00233 pinMode(DMD_PIN_SPI_MOSI, OUTPUT);
|
||||
<a name="l00234"></a>00234 pinMode(DMD_PIN_SPI_SS, OUTPUT);
|
||||
<a name="l00235"></a>00235 digitalWrite(DMD_PIN_SPI_SCK, LOW);
|
||||
<a name="l00236"></a>00236 digitalWrite(DMD_PIN_SPI_MOSI, LOW);
|
||||
<a name="l00237"></a>00237 digitalWrite(DMD_PIN_SPI_SS, HIGH);
|
||||
<a name="l00238"></a>00238 SPCR |= _BV(MSTR);
|
||||
<a name="l00239"></a>00239 SPCR |= _BV(SPE);
|
||||
<a name="l00240"></a>00240 SPCR &= ~(_BV(DORD)); <span class="comment">// MSB-first</span>
|
||||
<a name="l00241"></a>00241 SPCR &= ~0x0C; <span class="comment">// Mode 0</span>
|
||||
<a name="l00242"></a>00242 SPCR &= ~0x03; <span class="comment">// Clock divider rate 2</span>
|
||||
<a name="l00243"></a>00243 SPSR |= 0x01; <span class="comment">// MSB of clock divider rate</span>
|
||||
<a name="l00244"></a>00244
|
||||
<a name="l00245"></a>00245 <span class="comment">// Initialize the DMD-specific pins.</span>
|
||||
<a name="l00246"></a>00246 pinMode(DMD_PIN_PHASE_LSB, OUTPUT);
|
||||
<a name="l00247"></a>00247 pinMode(DMD_PIN_PHASE_MSB, OUTPUT);
|
||||
<a name="l00248"></a>00248 pinMode(DMD_PIN_LATCH, OUTPUT);
|
||||
<a name="l00249"></a>00249 pinMode(DMD_PIN_OUTPUT_ENABLE, OUTPUT);
|
||||
<a name="l00250"></a>00250 digitalWrite(DMD_PIN_PHASE_LSB, LOW);
|
||||
<a name="l00251"></a>00251 digitalWrite(DMD_PIN_PHASE_MSB, LOW);
|
||||
<a name="l00252"></a>00252 digitalWrite(DMD_PIN_LATCH, LOW);
|
||||
<a name="l00253"></a>00253 digitalWrite(DMD_PIN_OUTPUT_ENABLE, LOW);
|
||||
<a name="l00254"></a>00254 digitalWrite(DMD_PIN_SPI_MOSI, HIGH);
|
||||
<a name="l00255"></a>00255 }
|
||||
<a name="l00256"></a>00256
|
||||
<a name="l00260"></a><a class="code" href="classDMD.html#a7b37e05584d3e0308163700920df99b2">00260</a> <a class="code" href="classDMD.html#a7b37e05584d3e0308163700920df99b2" title="Destroys this dot matrix display handler.">DMD::~DMD</a>()
|
||||
<a name="l00261"></a>00261 {
|
||||
<a name="l00262"></a>00262 <span class="keywordflow">if</span> (fb0)
|
||||
<a name="l00263"></a>00263 free(fb0);
|
||||
<a name="l00264"></a>00264 <span class="keywordflow">if</span> (fb1)
|
||||
<a name="l00265"></a>00265 free(fb1);
|
||||
<a name="l00266"></a>00266 fb = 0; <span class="comment">// Don't free the buffer again in the base class.</span>
|
||||
<a name="l00267"></a>00267 }
|
||||
<a name="l00268"></a>00268
|
||||
<a name="l00296"></a><a class="code" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723">00296</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">DMD::setDoubleBuffer</a>(<span class="keywordtype">bool</span> doubleBuffer)
|
||||
<a name="l00297"></a>00297 {
|
||||
<a name="l00298"></a>00298 <span class="keywordflow">if</span> (doubleBuffer != _doubleBuffer) {
|
||||
<a name="l00299"></a>00299 _doubleBuffer = <a class="code" href="classDMD.html#aab1f3ba29c053d630ae12865d22166ec" title="Returns true if the display is double-buffered; false if single-buffered. The default is false...">doubleBuffer</a>;
|
||||
<a name="l00300"></a>00300 <span class="keywordflow">if</span> (doubleBuffer) {
|
||||
<a name="l00301"></a>00301 <span class="comment">// Allocate a new back buffer.</span>
|
||||
<a name="l00302"></a>00302 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size = _stride * _height;
|
||||
<a name="l00303"></a>00303 fb1 = (uint8_t *)malloc(size);
|
||||
<a name="l00304"></a>00304
|
||||
<a name="l00305"></a>00305 <span class="comment">// Clear the new back buffer and then switch to it, leaving</span>
|
||||
<a name="l00306"></a>00306 <span class="comment">// the current contents of fb0 on the screen.</span>
|
||||
<a name="l00307"></a>00307 <span class="keywordflow">if</span> (fb1) {
|
||||
<a name="l00308"></a>00308 memset(fb1, 0xFF, size);
|
||||
<a name="l00309"></a>00309 cli();
|
||||
<a name="l00310"></a>00310 fb = fb1;
|
||||
<a name="l00311"></a>00311 displayfb = fb0;
|
||||
<a name="l00312"></a>00312 sei();
|
||||
<a name="l00313"></a>00313 } <span class="keywordflow">else</span> {
|
||||
<a name="l00314"></a>00314 <span class="comment">// Failed to allocate the memory, so revert to single-buffered.</span>
|
||||
<a name="l00315"></a>00315 _doubleBuffer = <span class="keyword">false</span>;
|
||||
<a name="l00316"></a>00316 }
|
||||
<a name="l00317"></a>00317 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fb1) {
|
||||
<a name="l00318"></a>00318 <span class="comment">// Disabling double-buffering, so forcibly switch to fb0.</span>
|
||||
<a name="l00319"></a>00319 cli();
|
||||
<a name="l00320"></a>00320 fb = fb0;
|
||||
<a name="l00321"></a>00321 displayfb = fb0;
|
||||
<a name="l00322"></a>00322 sei();
|
||||
<a name="l00323"></a>00323
|
||||
<a name="l00324"></a>00324 <span class="comment">// Free the unnecessary buffer.</span>
|
||||
<a name="l00325"></a>00325 free(fb1);
|
||||
<a name="l00326"></a>00326 fb1 = 0;
|
||||
<a name="l00327"></a>00327 }
|
||||
<a name="l00328"></a>00328 }
|
||||
<a name="l00329"></a>00329 }
|
||||
<a name="l00330"></a>00330
|
||||
<a name="l00345"></a><a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a">00345</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">DMD::swapBuffers</a>()
|
||||
<a name="l00346"></a>00346 {
|
||||
<a name="l00347"></a>00347 <span class="keywordflow">if</span> (_doubleBuffer) {
|
||||
<a name="l00348"></a>00348 <span class="comment">// Turn off interrupts while swapping buffers so that we don't</span>
|
||||
<a name="l00349"></a>00349 <span class="comment">// accidentally try to refresh() in the middle of this code.</span>
|
||||
<a name="l00350"></a>00350 cli();
|
||||
<a name="l00351"></a>00351 <span class="keywordflow">if</span> (fb == fb0) {
|
||||
<a name="l00352"></a>00352 fb = fb1;
|
||||
<a name="l00353"></a>00353 displayfb = fb0;
|
||||
<a name="l00354"></a>00354 } <span class="keywordflow">else</span> {
|
||||
<a name="l00355"></a>00355 fb = fb0;
|
||||
<a name="l00356"></a>00356 displayfb = fb1;
|
||||
<a name="l00357"></a>00357 }
|
||||
<a name="l00358"></a>00358 sei();
|
||||
<a name="l00359"></a>00359 }
|
||||
<a name="l00360"></a>00360 }
|
||||
<a name="l00361"></a>00361
|
||||
<a name="l00378"></a><a class="code" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736">00378</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736" title="Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...">DMD::swapBuffersAndCopy</a>()
|
||||
<a name="l00379"></a>00379 {
|
||||
<a name="l00380"></a>00380 <a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">swapBuffers</a>();
|
||||
<a name="l00381"></a>00381 <span class="keywordflow">if</span> (_doubleBuffer)
|
||||
<a name="l00382"></a>00382 memcpy(fb, displayfb, _stride * _height);
|
||||
<a name="l00383"></a>00383 }
|
||||
<a name="l00384"></a>00384
|
||||
<a name="l00402"></a><a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114">00402</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">DMD::loop</a>()
|
||||
<a name="l00403"></a>00403 {
|
||||
<a name="l00404"></a>00404 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> currentTime = millis();
|
||||
<a name="l00405"></a>00405 <span class="keywordflow">if</span> ((currentTime - lastRefresh) >= DMD_REFRESH_MS) {
|
||||
<a name="l00406"></a>00406 lastRefresh = currentTime;
|
||||
<a name="l00407"></a>00407 <a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
<a name="l00408"></a>00408 }
|
||||
<a name="l00409"></a>00409 }
|
||||
<a name="l00410"></a>00410
|
||||
<a name="l00411"></a>00411 <span class="comment">// Send a single byte via SPI.</span>
|
||||
<a name="l00412"></a>00412 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> spiSend(byte value)
|
||||
<a name="l00413"></a>00413 {
|
||||
<a name="l00414"></a>00414 SPDR = value;
|
||||
<a name="l00415"></a>00415 <span class="keywordflow">while</span> (!(SPSR & _BV(SPIF)))
|
||||
<a name="l00416"></a>00416 ; <span class="comment">// Wait for the transfer to complete.</span>
|
||||
<a name="l00417"></a>00417 }
|
||||
<a name="l00418"></a>00418
|
||||
<a name="l00419"></a>00419 <span class="comment">// Flip the bits in a byte. Table generated by genflip.c</span>
|
||||
<a name="l00420"></a>00420 <span class="keyword">static</span> <span class="keyword">const</span> uint8_t flipBits[256] PROGMEM = {
|
||||
<a name="l00421"></a>00421 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0,
|
||||
<a name="l00422"></a>00422 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
<a name="l00423"></a>00423 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4,
|
||||
<a name="l00424"></a>00424 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
<a name="l00425"></a>00425 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
|
||||
<a name="l00426"></a>00426 0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
<a name="l00427"></a>00427 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, 0x0A, 0x8A, 0x4A, 0xCA,
|
||||
<a name="l00428"></a>00428 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
<a name="l00429"></a>00429 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6,
|
||||
<a name="l00430"></a>00430 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
<a name="l00431"></a>00431 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1,
|
||||
<a name="l00432"></a>00432 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
<a name="l00433"></a>00433 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9,
|
||||
<a name="l00434"></a>00434 0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
<a name="l00435"></a>00435 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
|
||||
<a name="l00436"></a>00436 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
<a name="l00437"></a>00437 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3,
|
||||
<a name="l00438"></a>00438 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
<a name="l00439"></a>00439 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7,
|
||||
<a name="l00440"></a>00440 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
<a name="l00441"></a>00441 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF,
|
||||
<a name="l00442"></a>00442 0x3F, 0xBF, 0x7F, 0xFF
|
||||
<a name="l00443"></a>00443 };
|
||||
<a name="l00444"></a>00444
|
||||
<a name="l00460"></a><a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8">00460</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">DMD::refresh</a>()
|
||||
<a name="l00461"></a>00461 {
|
||||
<a name="l00462"></a>00462 <span class="comment">// Bail out if there is a conflict on the SPI bus.</span>
|
||||
<a name="l00463"></a>00463 <span class="keywordflow">if</span> (!digitalRead(DMD_PIN_SPI_SS))
|
||||
<a name="l00464"></a>00464 <span class="keywordflow">return</span>;
|
||||
<a name="l00465"></a>00465
|
||||
<a name="l00466"></a>00466 <span class="comment">// Transfer the data for the next group of interleaved rows.</span>
|
||||
<a name="l00467"></a>00467 <span class="keywordtype">int</span> stride4 = _stride * 4;
|
||||
<a name="l00468"></a>00468 uint8_t *data0;
|
||||
<a name="l00469"></a>00469 uint8_t *data1;
|
||||
<a name="l00470"></a>00470 uint8_t *data2;
|
||||
<a name="l00471"></a>00471 uint8_t *data3;
|
||||
<a name="l00472"></a>00472 <span class="keywordtype">bool</span> flipRow = ((_height & 0x10) == 0);
|
||||
<a name="l00473"></a>00473 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = 0; y < _height; y += 16) {
|
||||
<a name="l00474"></a>00474 <span class="keywordflow">if</span> (!flipRow) {
|
||||
<a name="l00475"></a>00475 <span class="comment">// The panels in this row are the right way up.</span>
|
||||
<a name="l00476"></a>00476 data0 = displayfb + _stride * (y + phase);
|
||||
<a name="l00477"></a>00477 data1 = data0 + stride4;
|
||||
<a name="l00478"></a>00478 data2 = data1 + stride4;
|
||||
<a name="l00479"></a>00479 data3 = data2 + stride4;
|
||||
<a name="l00480"></a>00480 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = _stride; x > 0; --x) {
|
||||
<a name="l00481"></a>00481 spiSend(*data3++);
|
||||
<a name="l00482"></a>00482 spiSend(*data2++);
|
||||
<a name="l00483"></a>00483 spiSend(*data1++);
|
||||
<a name="l00484"></a>00484 spiSend(*data0++);
|
||||
<a name="l00485"></a>00485 }
|
||||
<a name="l00486"></a>00486 flipRow = <span class="keyword">true</span>;
|
||||
<a name="l00487"></a>00487 } <span class="keywordflow">else</span> {
|
||||
<a name="l00488"></a>00488 <span class="comment">// The panels in this row are upside-down and reversed.</span>
|
||||
<a name="l00489"></a>00489 data0 = displayfb + _stride * (y + 16 - phase) - 1;
|
||||
<a name="l00490"></a>00490 data1 = data0 - stride4;
|
||||
<a name="l00491"></a>00491 data2 = data1 - stride4;
|
||||
<a name="l00492"></a>00492 data3 = data2 - stride4;
|
||||
<a name="l00493"></a>00493 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = _stride; x > 0; --x) {
|
||||
<a name="l00494"></a>00494 spiSend(pgm_read_byte(&(flipBits[*data3--])));
|
||||
<a name="l00495"></a>00495 spiSend(pgm_read_byte(&(flipBits[*data2--])));
|
||||
<a name="l00496"></a>00496 spiSend(pgm_read_byte(&(flipBits[*data1--])));
|
||||
<a name="l00497"></a>00497 spiSend(pgm_read_byte(&(flipBits[*data0--])));
|
||||
<a name="l00498"></a>00498 }
|
||||
<a name="l00499"></a>00499 flipRow = <span class="keyword">false</span>;
|
||||
<a name="l00500"></a>00500 }
|
||||
<a name="l00501"></a>00501 }
|
||||
<a name="l00502"></a>00502
|
||||
<a name="l00503"></a>00503 <span class="comment">// Latch the data from the shift registers onto the actual display.</span>
|
||||
<a name="l00504"></a>00504 digitalWrite(DMD_PIN_OUTPUT_ENABLE, LOW);
|
||||
<a name="l00505"></a>00505 digitalWrite(DMD_PIN_LATCH, HIGH);
|
||||
<a name="l00506"></a>00506 digitalWrite(DMD_PIN_LATCH, LOW);
|
||||
<a name="l00507"></a>00507 <span class="keywordflow">if</span> (phase & 0x02)
|
||||
<a name="l00508"></a>00508 digitalWrite(DMD_PIN_PHASE_MSB, HIGH);
|
||||
<a name="l00509"></a>00509 <span class="keywordflow">else</span>
|
||||
<a name="l00510"></a>00510 digitalWrite(DMD_PIN_PHASE_MSB, LOW);
|
||||
<a name="l00511"></a>00511 <span class="keywordflow">if</span> (phase & 0x01)
|
||||
<a name="l00512"></a>00512 digitalWrite(DMD_PIN_PHASE_LSB, HIGH);
|
||||
<a name="l00513"></a>00513 <span class="keywordflow">else</span>
|
||||
<a name="l00514"></a>00514 digitalWrite(DMD_PIN_PHASE_LSB, LOW);
|
||||
<a name="l00515"></a>00515 digitalWrite(DMD_PIN_OUTPUT_ENABLE, HIGH);
|
||||
<a name="l00516"></a>00516 phase = (phase + 1) & 0x03;
|
||||
<a name="l00517"></a>00517 }
|
||||
<a name="l00518"></a>00518
|
||||
<a name="l00545"></a><a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2">00545</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">DMD::enableTimer1</a>()
|
||||
<a name="l00546"></a>00546 {
|
||||
<a name="l00547"></a>00547 <span class="comment">// Number of CPU cycles in the display's refresh period.</span>
|
||||
<a name="l00548"></a>00548 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> numCycles = (F_CPU / 2000000) * DMD_REFRESH_US;
|
||||
<a name="l00549"></a>00549
|
||||
<a name="l00550"></a>00550 <span class="comment">// Determine the prescaler to be used.</span>
|
||||
<a name="l00551"></a>00551 <span class="preprocessor"> #define TIMER1_RESOLUTION 65536UL</span>
|
||||
<a name="l00552"></a>00552 <span class="preprocessor"></span> uint8_t prescaler;
|
||||
<a name="l00553"></a>00553 <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION) {
|
||||
<a name="l00554"></a>00554 <span class="comment">// No prescaling required.</span>
|
||||
<a name="l00555"></a>00555 prescaler = _BV(CS10);
|
||||
<a name="l00556"></a>00556 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 8) {
|
||||
<a name="l00557"></a>00557 <span class="comment">// Prescaler = 8.</span>
|
||||
<a name="l00558"></a>00558 prescaler = _BV(CS11);
|
||||
<a name="l00559"></a>00559 numCycles >>= 3;
|
||||
<a name="l00560"></a>00560 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 64) {
|
||||
<a name="l00561"></a>00561 <span class="comment">// Prescaler = 64.</span>
|
||||
<a name="l00562"></a>00562 prescaler = _BV(CS11) | _BV(CS10);
|
||||
<a name="l00563"></a>00563 numCycles >>= 6;
|
||||
<a name="l00564"></a>00564 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 256) {
|
||||
<a name="l00565"></a>00565 <span class="comment">// Prescaler = 256.</span>
|
||||
<a name="l00566"></a>00566 prescaler = _BV(CS12);
|
||||
<a name="l00567"></a>00567 numCycles >>= 8;
|
||||
<a name="l00568"></a>00568 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 1024) {
|
||||
<a name="l00569"></a>00569 <span class="comment">// Prescaler = 1024.</span>
|
||||
<a name="l00570"></a>00570 prescaler = _BV(CS12) | _BV(CS10);
|
||||
<a name="l00571"></a>00571 numCycles >>= 10;
|
||||
<a name="l00572"></a>00572 } <span class="keywordflow">else</span> {
|
||||
<a name="l00573"></a>00573 <span class="comment">// Too long, so set the maximum timeout.</span>
|
||||
<a name="l00574"></a>00574 prescaler = _BV(CS12) | _BV(CS10);
|
||||
<a name="l00575"></a>00575 numCycles = TIMER1_RESOLUTION - 1;
|
||||
<a name="l00576"></a>00576 }
|
||||
<a name="l00577"></a>00577
|
||||
<a name="l00578"></a>00578 <span class="comment">// Configure Timer1 for the period we want.</span>
|
||||
<a name="l00579"></a>00579 TCCR1A = 0;
|
||||
<a name="l00580"></a>00580 TCCR1B = _BV(WGM13);
|
||||
<a name="l00581"></a>00581 uint8_t saveSREG = SREG;
|
||||
<a name="l00582"></a>00582 cli();
|
||||
<a name="l00583"></a>00583 ICR1 = numCycles;
|
||||
<a name="l00584"></a>00584 SREG = saveSREG; <span class="comment">// Implicit sei() if interrupts were on previously.</span>
|
||||
<a name="l00585"></a>00585 TCCR1B = (TCCR1B & ~(_BV(CS12) | _BV(CS11) | _BV(CS10))) | prescaler;
|
||||
<a name="l00586"></a>00586
|
||||
<a name="l00587"></a>00587 <span class="comment">// Turn on the Timer1 overflow interrupt.</span>
|
||||
<a name="l00588"></a>00588 TIMSK1 |= _BV(TOIE1);
|
||||
<a name="l00589"></a>00589 }
|
||||
<a name="l00590"></a>00590
|
||||
<a name="l00596"></a><a class="code" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33">00596</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33" title="Disables Timer1 overflow interrupts.">DMD::disableTimer1</a>()
|
||||
<a name="l00597"></a>00597 {
|
||||
<a name="l00598"></a>00598 <span class="comment">// Turn off the Timer1 overflow interrupt.</span>
|
||||
<a name="l00599"></a>00599 TIMSK1 &= ~_BV(TOIE1);
|
||||
<a name="l00600"></a>00600 }
|
||||
<a name="l00601"></a>00601
|
||||
<a name="l00612"></a><a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0">00612</a> <a class="code" href="classBitmap.html#a88d386944a7017aa776a177b10d8b2ba" title="Type that represents the color of a pixel in a bitmap.">DMD::Color</a> <a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0" title="Converts an RGB value into a pixel color value.">DMD::fromRGB</a>(uint8_t r, uint8_t g, uint8_t b)
|
||||
<a name="l00613"></a>00613 {
|
||||
<a name="l00614"></a>00614 <span class="keywordflow">if</span> (r || g || b)
|
||||
<a name="l00615"></a>00615 <span class="keywordflow">return</span> <a class="code" href="classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7" title="Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a d...">White</a>;
|
||||
<a name="l00616"></a>00616 <span class="keywordflow">else</span>
|
||||
<a name="l00617"></a>00617 <span class="keywordflow">return</span> <a class="code" href="classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc" title="Color value corresponding to "black".">Black</a>;
|
||||
<a name="l00210"></a>00210 <span class="comment">// Pins on the DMD connector board.</span>
|
||||
<a name="l00211"></a>00211 <span class="preprocessor">#define DMD_PIN_PHASE_LSB 6 // A</span>
|
||||
<a name="l00212"></a>00212 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_PHASE_MSB 7 // B</span>
|
||||
<a name="l00213"></a>00213 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_LATCH 8 // SCLK</span>
|
||||
<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_OUTPUT_ENABLE 9 // nOE</span>
|
||||
<a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_SS SS // SPI Slave Select</span>
|
||||
<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_MOSI MOSI // SPI Master Out, Slave In (R)</span>
|
||||
<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_MISO MISO // SPI Master In, Slave Out</span>
|
||||
<a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#define DMD_PIN_SPI_SCK SCK // SPI Serial Clock (CLK)</span>
|
||||
<a name="l00219"></a>00219 <span class="preprocessor"></span>
|
||||
<a name="l00220"></a>00220 <span class="comment">// Dimension information for the display.</span>
|
||||
<a name="l00221"></a>00221 <span class="preprocessor">#define DMD_NUM_COLUMNS 32 // Number of columns in a panel.</span>
|
||||
<a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#define DMD_NUM_ROWS 16 // Number of rows in a panel.</span>
|
||||
<a name="l00223"></a>00223 <span class="preprocessor"></span>
|
||||
<a name="l00224"></a>00224 <span class="comment">// Refresh times.</span>
|
||||
<a name="l00225"></a>00225 <span class="preprocessor">#define DMD_REFRESH_MS 5</span>
|
||||
<a name="l00226"></a>00226 <span class="preprocessor"></span><span class="preprocessor">#define DMD_REFRESH_US 5000</span>
|
||||
<a name="l00227"></a>00227 <span class="preprocessor"></span>
|
||||
<a name="l00237"></a><a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809">00237</a> <a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809" title="Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...">DMD::DMD</a>(<span class="keywordtype">int</span> widthPanels, <span class="keywordtype">int</span> heightPanels)
|
||||
<a name="l00238"></a>00238 : <a class="code" href="classBitmap.html" title="Represents a monochrome bitmap within main memory.">Bitmap</a>(widthPanels * DMD_NUM_COLUMNS, heightPanels * DMD_NUM_ROWS)
|
||||
<a name="l00239"></a>00239 , _doubleBuffer(false)
|
||||
<a name="l00240"></a>00240 , phase(0)
|
||||
<a name="l00241"></a>00241 , fb0(0)
|
||||
<a name="l00242"></a>00242 , fb1(0)
|
||||
<a name="l00243"></a>00243 , displayfb(0)
|
||||
<a name="l00244"></a>00244 , lastRefresh(millis())
|
||||
<a name="l00245"></a>00245 {
|
||||
<a name="l00246"></a>00246 <span class="comment">// Both rendering and display are to fb0 initially.</span>
|
||||
<a name="l00247"></a>00247 fb0 = displayfb = fb;
|
||||
<a name="l00248"></a>00248
|
||||
<a name="l00249"></a>00249 <span class="comment">// Initialize SPI to MSB-first, mode 0, clock divider = 2.</span>
|
||||
<a name="l00250"></a>00250 pinMode(DMD_PIN_SPI_SCK, OUTPUT);
|
||||
<a name="l00251"></a>00251 pinMode(DMD_PIN_SPI_MOSI, OUTPUT);
|
||||
<a name="l00252"></a>00252 pinMode(DMD_PIN_SPI_SS, OUTPUT);
|
||||
<a name="l00253"></a>00253 digitalWrite(DMD_PIN_SPI_SCK, LOW);
|
||||
<a name="l00254"></a>00254 digitalWrite(DMD_PIN_SPI_MOSI, LOW);
|
||||
<a name="l00255"></a>00255 digitalWrite(DMD_PIN_SPI_SS, HIGH);
|
||||
<a name="l00256"></a>00256 SPCR |= _BV(MSTR);
|
||||
<a name="l00257"></a>00257 SPCR |= _BV(SPE);
|
||||
<a name="l00258"></a>00258 SPCR &= ~(_BV(DORD)); <span class="comment">// MSB-first</span>
|
||||
<a name="l00259"></a>00259 SPCR &= ~0x0C; <span class="comment">// Mode 0</span>
|
||||
<a name="l00260"></a>00260 SPCR &= ~0x03; <span class="comment">// Clock divider rate 2</span>
|
||||
<a name="l00261"></a>00261 SPSR |= 0x01; <span class="comment">// MSB of clock divider rate</span>
|
||||
<a name="l00262"></a>00262
|
||||
<a name="l00263"></a>00263 <span class="comment">// Initialize the DMD-specific pins.</span>
|
||||
<a name="l00264"></a>00264 pinMode(DMD_PIN_PHASE_LSB, OUTPUT);
|
||||
<a name="l00265"></a>00265 pinMode(DMD_PIN_PHASE_MSB, OUTPUT);
|
||||
<a name="l00266"></a>00266 pinMode(DMD_PIN_LATCH, OUTPUT);
|
||||
<a name="l00267"></a>00267 pinMode(DMD_PIN_OUTPUT_ENABLE, OUTPUT);
|
||||
<a name="l00268"></a>00268 digitalWrite(DMD_PIN_PHASE_LSB, LOW);
|
||||
<a name="l00269"></a>00269 digitalWrite(DMD_PIN_PHASE_MSB, LOW);
|
||||
<a name="l00270"></a>00270 digitalWrite(DMD_PIN_LATCH, LOW);
|
||||
<a name="l00271"></a>00271 digitalWrite(DMD_PIN_OUTPUT_ENABLE, LOW);
|
||||
<a name="l00272"></a>00272 digitalWrite(DMD_PIN_SPI_MOSI, HIGH);
|
||||
<a name="l00273"></a>00273 }
|
||||
<a name="l00274"></a>00274
|
||||
<a name="l00278"></a><a class="code" href="classDMD.html#a7b37e05584d3e0308163700920df99b2">00278</a> <a class="code" href="classDMD.html#a7b37e05584d3e0308163700920df99b2" title="Destroys this dot matrix display handler.">DMD::~DMD</a>()
|
||||
<a name="l00279"></a>00279 {
|
||||
<a name="l00280"></a>00280 <span class="keywordflow">if</span> (fb0)
|
||||
<a name="l00281"></a>00281 free(fb0);
|
||||
<a name="l00282"></a>00282 <span class="keywordflow">if</span> (fb1)
|
||||
<a name="l00283"></a>00283 free(fb1);
|
||||
<a name="l00284"></a>00284 fb = 0; <span class="comment">// Don't free the buffer again in the base class.</span>
|
||||
<a name="l00285"></a>00285 }
|
||||
<a name="l00286"></a>00286
|
||||
<a name="l00314"></a><a class="code" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723">00314</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">DMD::setDoubleBuffer</a>(<span class="keywordtype">bool</span> doubleBuffer)
|
||||
<a name="l00315"></a>00315 {
|
||||
<a name="l00316"></a>00316 <span class="keywordflow">if</span> (doubleBuffer != _doubleBuffer) {
|
||||
<a name="l00317"></a>00317 _doubleBuffer = <a class="code" href="classDMD.html#aab1f3ba29c053d630ae12865d22166ec" title="Returns true if the display is double-buffered; false if single-buffered. The default is false...">doubleBuffer</a>;
|
||||
<a name="l00318"></a>00318 <span class="keywordflow">if</span> (doubleBuffer) {
|
||||
<a name="l00319"></a>00319 <span class="comment">// Allocate a new back buffer.</span>
|
||||
<a name="l00320"></a>00320 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size = _stride * _height;
|
||||
<a name="l00321"></a>00321 fb1 = (uint8_t *)malloc(size);
|
||||
<a name="l00322"></a>00322
|
||||
<a name="l00323"></a>00323 <span class="comment">// Clear the new back buffer and then switch to it, leaving</span>
|
||||
<a name="l00324"></a>00324 <span class="comment">// the current contents of fb0 on the screen.</span>
|
||||
<a name="l00325"></a>00325 <span class="keywordflow">if</span> (fb1) {
|
||||
<a name="l00326"></a>00326 memset(fb1, 0xFF, size);
|
||||
<a name="l00327"></a>00327 cli();
|
||||
<a name="l00328"></a>00328 fb = fb1;
|
||||
<a name="l00329"></a>00329 displayfb = fb0;
|
||||
<a name="l00330"></a>00330 sei();
|
||||
<a name="l00331"></a>00331 } <span class="keywordflow">else</span> {
|
||||
<a name="l00332"></a>00332 <span class="comment">// Failed to allocate the memory, so revert to single-buffered.</span>
|
||||
<a name="l00333"></a>00333 _doubleBuffer = <span class="keyword">false</span>;
|
||||
<a name="l00334"></a>00334 }
|
||||
<a name="l00335"></a>00335 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fb1) {
|
||||
<a name="l00336"></a>00336 <span class="comment">// Disabling double-buffering, so forcibly switch to fb0.</span>
|
||||
<a name="l00337"></a>00337 cli();
|
||||
<a name="l00338"></a>00338 fb = fb0;
|
||||
<a name="l00339"></a>00339 displayfb = fb0;
|
||||
<a name="l00340"></a>00340 sei();
|
||||
<a name="l00341"></a>00341
|
||||
<a name="l00342"></a>00342 <span class="comment">// Free the unnecessary buffer.</span>
|
||||
<a name="l00343"></a>00343 free(fb1);
|
||||
<a name="l00344"></a>00344 fb1 = 0;
|
||||
<a name="l00345"></a>00345 }
|
||||
<a name="l00346"></a>00346 }
|
||||
<a name="l00347"></a>00347 }
|
||||
<a name="l00348"></a>00348
|
||||
<a name="l00363"></a><a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a">00363</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">DMD::swapBuffers</a>()
|
||||
<a name="l00364"></a>00364 {
|
||||
<a name="l00365"></a>00365 <span class="keywordflow">if</span> (_doubleBuffer) {
|
||||
<a name="l00366"></a>00366 <span class="comment">// Turn off interrupts while swapping buffers so that we don't</span>
|
||||
<a name="l00367"></a>00367 <span class="comment">// accidentally try to refresh() in the middle of this code.</span>
|
||||
<a name="l00368"></a>00368 cli();
|
||||
<a name="l00369"></a>00369 <span class="keywordflow">if</span> (fb == fb0) {
|
||||
<a name="l00370"></a>00370 fb = fb1;
|
||||
<a name="l00371"></a>00371 displayfb = fb0;
|
||||
<a name="l00372"></a>00372 } <span class="keywordflow">else</span> {
|
||||
<a name="l00373"></a>00373 fb = fb0;
|
||||
<a name="l00374"></a>00374 displayfb = fb1;
|
||||
<a name="l00375"></a>00375 }
|
||||
<a name="l00376"></a>00376 sei();
|
||||
<a name="l00377"></a>00377 }
|
||||
<a name="l00378"></a>00378 }
|
||||
<a name="l00379"></a>00379
|
||||
<a name="l00396"></a><a class="code" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736">00396</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736" title="Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...">DMD::swapBuffersAndCopy</a>()
|
||||
<a name="l00397"></a>00397 {
|
||||
<a name="l00398"></a>00398 <a class="code" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">swapBuffers</a>();
|
||||
<a name="l00399"></a>00399 <span class="keywordflow">if</span> (_doubleBuffer)
|
||||
<a name="l00400"></a>00400 memcpy(fb, displayfb, _stride * _height);
|
||||
<a name="l00401"></a>00401 }
|
||||
<a name="l00402"></a>00402
|
||||
<a name="l00420"></a><a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114">00420</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">DMD::loop</a>()
|
||||
<a name="l00421"></a>00421 {
|
||||
<a name="l00422"></a>00422 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> currentTime = millis();
|
||||
<a name="l00423"></a>00423 <span class="keywordflow">if</span> ((currentTime - lastRefresh) >= DMD_REFRESH_MS) {
|
||||
<a name="l00424"></a>00424 lastRefresh = currentTime;
|
||||
<a name="l00425"></a>00425 <a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
<a name="l00426"></a>00426 }
|
||||
<a name="l00427"></a>00427 }
|
||||
<a name="l00428"></a>00428
|
||||
<a name="l00429"></a>00429 <span class="comment">// Send a single byte via SPI.</span>
|
||||
<a name="l00430"></a>00430 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> spiSend(byte value)
|
||||
<a name="l00431"></a>00431 {
|
||||
<a name="l00432"></a>00432 SPDR = value;
|
||||
<a name="l00433"></a>00433 <span class="keywordflow">while</span> (!(SPSR & _BV(SPIF)))
|
||||
<a name="l00434"></a>00434 ; <span class="comment">// Wait for the transfer to complete.</span>
|
||||
<a name="l00435"></a>00435 }
|
||||
<a name="l00436"></a>00436
|
||||
<a name="l00437"></a>00437 <span class="comment">// Flip the bits in a byte. Table generated by genflip.c</span>
|
||||
<a name="l00438"></a>00438 <span class="keyword">static</span> <span class="keyword">const</span> uint8_t flipBits[256] PROGMEM = {
|
||||
<a name="l00439"></a>00439 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0,
|
||||
<a name="l00440"></a>00440 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
|
||||
<a name="l00441"></a>00441 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4,
|
||||
<a name="l00442"></a>00442 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
|
||||
<a name="l00443"></a>00443 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
|
||||
<a name="l00444"></a>00444 0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
|
||||
<a name="l00445"></a>00445 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, 0x0A, 0x8A, 0x4A, 0xCA,
|
||||
<a name="l00446"></a>00446 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
|
||||
<a name="l00447"></a>00447 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6,
|
||||
<a name="l00448"></a>00448 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
<a name="l00449"></a>00449 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1,
|
||||
<a name="l00450"></a>00450 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
|
||||
<a name="l00451"></a>00451 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9,
|
||||
<a name="l00452"></a>00452 0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
|
||||
<a name="l00453"></a>00453 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
|
||||
<a name="l00454"></a>00454 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
|
||||
<a name="l00455"></a>00455 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3,
|
||||
<a name="l00456"></a>00456 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
|
||||
<a name="l00457"></a>00457 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7,
|
||||
<a name="l00458"></a>00458 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
<a name="l00459"></a>00459 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF,
|
||||
<a name="l00460"></a>00460 0x3F, 0xBF, 0x7F, 0xFF
|
||||
<a name="l00461"></a>00461 };
|
||||
<a name="l00462"></a>00462
|
||||
<a name="l00478"></a><a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8">00478</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">DMD::refresh</a>()
|
||||
<a name="l00479"></a>00479 {
|
||||
<a name="l00480"></a>00480 <span class="comment">// Bail out if there is a conflict on the SPI bus.</span>
|
||||
<a name="l00481"></a>00481 <span class="keywordflow">if</span> (!digitalRead(DMD_PIN_SPI_SS))
|
||||
<a name="l00482"></a>00482 <span class="keywordflow">return</span>;
|
||||
<a name="l00483"></a>00483
|
||||
<a name="l00484"></a>00484 <span class="comment">// Transfer the data for the next group of interleaved rows.</span>
|
||||
<a name="l00485"></a>00485 <span class="keywordtype">int</span> stride4 = _stride * 4;
|
||||
<a name="l00486"></a>00486 uint8_t *data0;
|
||||
<a name="l00487"></a>00487 uint8_t *data1;
|
||||
<a name="l00488"></a>00488 uint8_t *data2;
|
||||
<a name="l00489"></a>00489 uint8_t *data3;
|
||||
<a name="l00490"></a>00490 <span class="keywordtype">bool</span> flipRow = ((_height & 0x10) == 0);
|
||||
<a name="l00491"></a>00491 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = 0; y < _height; y += 16) {
|
||||
<a name="l00492"></a>00492 <span class="keywordflow">if</span> (!flipRow) {
|
||||
<a name="l00493"></a>00493 <span class="comment">// The panels in this row are the right way up.</span>
|
||||
<a name="l00494"></a>00494 data0 = displayfb + _stride * (y + phase);
|
||||
<a name="l00495"></a>00495 data1 = data0 + stride4;
|
||||
<a name="l00496"></a>00496 data2 = data1 + stride4;
|
||||
<a name="l00497"></a>00497 data3 = data2 + stride4;
|
||||
<a name="l00498"></a>00498 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = _stride; x > 0; --x) {
|
||||
<a name="l00499"></a>00499 spiSend(*data3++);
|
||||
<a name="l00500"></a>00500 spiSend(*data2++);
|
||||
<a name="l00501"></a>00501 spiSend(*data1++);
|
||||
<a name="l00502"></a>00502 spiSend(*data0++);
|
||||
<a name="l00503"></a>00503 }
|
||||
<a name="l00504"></a>00504 flipRow = <span class="keyword">true</span>;
|
||||
<a name="l00505"></a>00505 } <span class="keywordflow">else</span> {
|
||||
<a name="l00506"></a>00506 <span class="comment">// The panels in this row are upside-down and reversed.</span>
|
||||
<a name="l00507"></a>00507 data0 = displayfb + _stride * (y + 16 - phase) - 1;
|
||||
<a name="l00508"></a>00508 data1 = data0 - stride4;
|
||||
<a name="l00509"></a>00509 data2 = data1 - stride4;
|
||||
<a name="l00510"></a>00510 data3 = data2 - stride4;
|
||||
<a name="l00511"></a>00511 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = _stride; x > 0; --x) {
|
||||
<a name="l00512"></a>00512 spiSend(pgm_read_byte(&(flipBits[*data3--])));
|
||||
<a name="l00513"></a>00513 spiSend(pgm_read_byte(&(flipBits[*data2--])));
|
||||
<a name="l00514"></a>00514 spiSend(pgm_read_byte(&(flipBits[*data1--])));
|
||||
<a name="l00515"></a>00515 spiSend(pgm_read_byte(&(flipBits[*data0--])));
|
||||
<a name="l00516"></a>00516 }
|
||||
<a name="l00517"></a>00517 flipRow = <span class="keyword">false</span>;
|
||||
<a name="l00518"></a>00518 }
|
||||
<a name="l00519"></a>00519 }
|
||||
<a name="l00520"></a>00520
|
||||
<a name="l00521"></a>00521 <span class="comment">// Latch the data from the shift registers onto the actual display.</span>
|
||||
<a name="l00522"></a>00522 digitalWrite(DMD_PIN_OUTPUT_ENABLE, LOW);
|
||||
<a name="l00523"></a>00523 digitalWrite(DMD_PIN_LATCH, HIGH);
|
||||
<a name="l00524"></a>00524 digitalWrite(DMD_PIN_LATCH, LOW);
|
||||
<a name="l00525"></a>00525 <span class="keywordflow">if</span> (phase & 0x02)
|
||||
<a name="l00526"></a>00526 digitalWrite(DMD_PIN_PHASE_MSB, HIGH);
|
||||
<a name="l00527"></a>00527 <span class="keywordflow">else</span>
|
||||
<a name="l00528"></a>00528 digitalWrite(DMD_PIN_PHASE_MSB, LOW);
|
||||
<a name="l00529"></a>00529 <span class="keywordflow">if</span> (phase & 0x01)
|
||||
<a name="l00530"></a>00530 digitalWrite(DMD_PIN_PHASE_LSB, HIGH);
|
||||
<a name="l00531"></a>00531 <span class="keywordflow">else</span>
|
||||
<a name="l00532"></a>00532 digitalWrite(DMD_PIN_PHASE_LSB, LOW);
|
||||
<a name="l00533"></a>00533 digitalWrite(DMD_PIN_OUTPUT_ENABLE, HIGH);
|
||||
<a name="l00534"></a>00534 phase = (phase + 1) & 0x03;
|
||||
<a name="l00535"></a>00535 }
|
||||
<a name="l00536"></a>00536
|
||||
<a name="l00563"></a><a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2">00563</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">DMD::enableTimer1</a>()
|
||||
<a name="l00564"></a>00564 {
|
||||
<a name="l00565"></a>00565 <span class="comment">// Number of CPU cycles in the display's refresh period.</span>
|
||||
<a name="l00566"></a>00566 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> numCycles = (F_CPU / 2000000) * DMD_REFRESH_US;
|
||||
<a name="l00567"></a>00567
|
||||
<a name="l00568"></a>00568 <span class="comment">// Determine the prescaler to be used.</span>
|
||||
<a name="l00569"></a>00569 <span class="preprocessor"> #define TIMER1_RESOLUTION 65536UL</span>
|
||||
<a name="l00570"></a>00570 <span class="preprocessor"></span> uint8_t prescaler;
|
||||
<a name="l00571"></a>00571 <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION) {
|
||||
<a name="l00572"></a>00572 <span class="comment">// No prescaling required.</span>
|
||||
<a name="l00573"></a>00573 prescaler = _BV(CS10);
|
||||
<a name="l00574"></a>00574 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 8) {
|
||||
<a name="l00575"></a>00575 <span class="comment">// Prescaler = 8.</span>
|
||||
<a name="l00576"></a>00576 prescaler = _BV(CS11);
|
||||
<a name="l00577"></a>00577 numCycles >>= 3;
|
||||
<a name="l00578"></a>00578 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 64) {
|
||||
<a name="l00579"></a>00579 <span class="comment">// Prescaler = 64.</span>
|
||||
<a name="l00580"></a>00580 prescaler = _BV(CS11) | _BV(CS10);
|
||||
<a name="l00581"></a>00581 numCycles >>= 6;
|
||||
<a name="l00582"></a>00582 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 256) {
|
||||
<a name="l00583"></a>00583 <span class="comment">// Prescaler = 256.</span>
|
||||
<a name="l00584"></a>00584 prescaler = _BV(CS12);
|
||||
<a name="l00585"></a>00585 numCycles >>= 8;
|
||||
<a name="l00586"></a>00586 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numCycles < TIMER1_RESOLUTION * 1024) {
|
||||
<a name="l00587"></a>00587 <span class="comment">// Prescaler = 1024.</span>
|
||||
<a name="l00588"></a>00588 prescaler = _BV(CS12) | _BV(CS10);
|
||||
<a name="l00589"></a>00589 numCycles >>= 10;
|
||||
<a name="l00590"></a>00590 } <span class="keywordflow">else</span> {
|
||||
<a name="l00591"></a>00591 <span class="comment">// Too long, so set the maximum timeout.</span>
|
||||
<a name="l00592"></a>00592 prescaler = _BV(CS12) | _BV(CS10);
|
||||
<a name="l00593"></a>00593 numCycles = TIMER1_RESOLUTION - 1;
|
||||
<a name="l00594"></a>00594 }
|
||||
<a name="l00595"></a>00595
|
||||
<a name="l00596"></a>00596 <span class="comment">// Configure Timer1 for the period we want.</span>
|
||||
<a name="l00597"></a>00597 TCCR1A = 0;
|
||||
<a name="l00598"></a>00598 TCCR1B = _BV(WGM13);
|
||||
<a name="l00599"></a>00599 uint8_t saveSREG = SREG;
|
||||
<a name="l00600"></a>00600 cli();
|
||||
<a name="l00601"></a>00601 ICR1 = numCycles;
|
||||
<a name="l00602"></a>00602 SREG = saveSREG; <span class="comment">// Implicit sei() if interrupts were on previously.</span>
|
||||
<a name="l00603"></a>00603 TCCR1B = (TCCR1B & ~(_BV(CS12) | _BV(CS11) | _BV(CS10))) | prescaler;
|
||||
<a name="l00604"></a>00604
|
||||
<a name="l00605"></a>00605 <span class="comment">// Turn on the Timer1 overflow interrupt.</span>
|
||||
<a name="l00606"></a>00606 TIMSK1 |= _BV(TOIE1);
|
||||
<a name="l00607"></a>00607 }
|
||||
<a name="l00608"></a>00608
|
||||
<a name="l00614"></a><a class="code" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33">00614</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33" title="Disables Timer1 overflow interrupts.">DMD::disableTimer1</a>()
|
||||
<a name="l00615"></a>00615 {
|
||||
<a name="l00616"></a>00616 <span class="comment">// Turn off the Timer1 overflow interrupt.</span>
|
||||
<a name="l00617"></a>00617 TIMSK1 &= ~_BV(TOIE1);
|
||||
<a name="l00618"></a>00618 }
|
||||
<a name="l00619"></a>00619
|
||||
<a name="l00646"></a><a class="code" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97">00646</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">DMD::enableTimer2</a>()
|
||||
<a name="l00647"></a>00647 {
|
||||
<a name="l00648"></a>00648 <span class="comment">// Configure Timer2 for the period we want. With the prescaler set</span>
|
||||
<a name="l00649"></a>00649 <span class="comment">// to 128, then 256 increments of Timer2 gives roughly 4 ms between</span>
|
||||
<a name="l00650"></a>00650 <span class="comment">// overflows on a system with a 16 MHz clock. We adjust the prescaler</span>
|
||||
<a name="l00651"></a>00651 <span class="comment">// accordingly for other clock frequencies.</span>
|
||||
<a name="l00652"></a>00652 TCCR2A = 0;
|
||||
<a name="l00653"></a>00653 <span class="keywordflow">if</span> (F_CPU >= 32000000)
|
||||
<a name="l00654"></a>00654 TCCR2B = _BV(CS22) | _BV(CS21); <span class="comment">// Prescaler = 256</span>
|
||||
<a name="l00655"></a>00655 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (F_CPU >= 16000000)
|
||||
<a name="l00656"></a>00656 TCCR2B = _BV(CS22) | _BV(CS20); <span class="comment">// Prescaler = 128</span>
|
||||
<a name="l00657"></a>00657 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (F_CPU >= 8000000)
|
||||
<a name="l00658"></a>00658 TCCR2B = _BV(CS22); <span class="comment">// Prescaler = 64</span>
|
||||
<a name="l00659"></a>00659 <span class="keywordflow">else</span>
|
||||
<a name="l00660"></a>00660 TCCR2B = _BV(CS21) | _BV(CS20); <span class="comment">// Prescaler = 32</span>
|
||||
<a name="l00661"></a>00661
|
||||
<a name="l00662"></a>00662 <span class="comment">// Reset Timer2 to kick off the process.</span>
|
||||
<a name="l00663"></a>00663 TCNT2 = 0;
|
||||
<a name="l00664"></a>00664
|
||||
<a name="l00665"></a>00665 <span class="comment">// Turn on the Timer2 overflow interrupt (also turn off OCIE2A and OCIE2B).</span>
|
||||
<a name="l00666"></a>00666 TIMSK2 = _BV(TOIE2);
|
||||
<a name="l00667"></a>00667 }
|
||||
<a name="l00668"></a>00668
|
||||
<a name="l00674"></a><a class="code" href="classDMD.html#a52fe885bfb380b74df54c96221811cff">00674</a> <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a52fe885bfb380b74df54c96221811cff" title="Disables Timer2 overflow interrupts.">DMD::disableTimer2</a>()
|
||||
<a name="l00675"></a>00675 {
|
||||
<a name="l00676"></a>00676 <span class="comment">// Turn off the Timer2 overflow interrupt.</span>
|
||||
<a name="l00677"></a>00677 TIMSK2 &= ~_BV(TOIE2);
|
||||
<a name="l00678"></a>00678 }
|
||||
<a name="l00679"></a>00679
|
||||
<a name="l00690"></a><a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0">00690</a> <a class="code" href="classBitmap.html#a88d386944a7017aa776a177b10d8b2ba" title="Type that represents the color of a pixel in a bitmap.">DMD::Color</a> <a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0" title="Converts an RGB value into a pixel color value.">DMD::fromRGB</a>(uint8_t r, uint8_t g, uint8_t b)
|
||||
<a name="l00691"></a>00691 {
|
||||
<a name="l00692"></a>00692 <span class="keywordflow">if</span> (r || g || b)
|
||||
<a name="l00693"></a>00693 <span class="keywordflow">return</span> <a class="code" href="classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7" title="Color value corresponding to "white". If the bitmap is displayed on a LED array, then it may have a d...">White</a>;
|
||||
<a name="l00694"></a>00694 <span class="keywordflow">else</span>
|
||||
<a name="l00695"></a>00695 <span class="keywordflow">return</span> <a class="code" href="classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc" title="Color value corresponding to "black".">Black</a>;
|
||||
<a name="l00696"></a>00696 }
|
||||
</pre></div></div>
|
||||
</div>
|
||||
<!-- window showing the filter options -->
|
||||
@ -395,7 +424,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -104,22 +104,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<a name="l00042"></a>00042 <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1</a>();
|
||||
<a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33" title="Disables Timer1 overflow interrupts.">disableTimer1</a>();
|
||||
<a name="l00044"></a>00044
|
||||
<a name="l00045"></a>00045 <span class="keyword">static</span> <a class="code" href="classBitmap.html#a88d386944a7017aa776a177b10d8b2ba" title="Type that represents the color of a pixel in a bitmap.">Color</a> <a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0" title="Converts an RGB value into a pixel color value.">fromRGB</a>(uint8_t r, uint8_t g, uint8_t b);
|
||||
<a name="l00046"></a>00046
|
||||
<a name="l00047"></a>00047 <span class="keyword">private</span>:
|
||||
<a name="l00048"></a>00048 <span class="comment">// Disable copy constructor and operator=().</span>
|
||||
<a name="l00049"></a>00049 <a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809" title="Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...">DMD</a>(<span class="keyword">const</span> <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &other) : <a class="code" href="classBitmap.html" title="Represents a monochrome bitmap within main memory.">Bitmap</a>(other) {}
|
||||
<a name="l00050"></a>00050 <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &operator=(<span class="keyword">const</span> <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00052"></a>00052 <span class="keywordtype">bool</span> _doubleBuffer;
|
||||
<a name="l00053"></a>00053 uint8_t phase;
|
||||
<a name="l00054"></a>00054 uint8_t *fb0;
|
||||
<a name="l00055"></a>00055 uint8_t *fb1;
|
||||
<a name="l00056"></a>00056 uint8_t *displayfb;
|
||||
<a name="l00057"></a>00057 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastRefresh;
|
||||
<a name="l00058"></a>00058 };
|
||||
<a name="l00059"></a>00059
|
||||
<a name="l00060"></a>00060 <span class="preprocessor">#endif</span>
|
||||
<a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">enableTimer2</a>();
|
||||
<a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="classDMD.html#a52fe885bfb380b74df54c96221811cff" title="Disables Timer2 overflow interrupts.">disableTimer2</a>();
|
||||
<a name="l00047"></a>00047
|
||||
<a name="l00048"></a>00048 <span class="keyword">static</span> <a class="code" href="classBitmap.html#a88d386944a7017aa776a177b10d8b2ba" title="Type that represents the color of a pixel in a bitmap.">Color</a> <a class="code" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0" title="Converts an RGB value into a pixel color value.">fromRGB</a>(uint8_t r, uint8_t g, uint8_t b);
|
||||
<a name="l00049"></a>00049
|
||||
<a name="l00050"></a>00050 <span class="keyword">private</span>:
|
||||
<a name="l00051"></a>00051 <span class="comment">// Disable copy constructor and operator=().</span>
|
||||
<a name="l00052"></a>00052 <a class="code" href="classDMD.html#affd37accffe951c8878434dfa1245809" title="Constructs a new dot matrix display handler for a display that is widthPanels x heightPanels in size...">DMD</a>(<span class="keyword">const</span> <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &other) : <a class="code" href="classBitmap.html" title="Represents a monochrome bitmap within main memory.">Bitmap</a>(other) {}
|
||||
<a name="l00053"></a>00053 <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &operator=(<span class="keyword">const</span> <a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> &) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
|
||||
<a name="l00054"></a>00054
|
||||
<a name="l00055"></a>00055 <span class="keywordtype">bool</span> _doubleBuffer;
|
||||
<a name="l00056"></a>00056 uint8_t phase;
|
||||
<a name="l00057"></a>00057 uint8_t *fb0;
|
||||
<a name="l00058"></a>00058 uint8_t *fb1;
|
||||
<a name="l00059"></a>00059 uint8_t *displayfb;
|
||||
<a name="l00060"></a>00060 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastRefresh;
|
||||
<a name="l00061"></a>00061 };
|
||||
<a name="l00062"></a>00062
|
||||
<a name="l00063"></a>00063 <span class="preprocessor">#endif</span>
|
||||
</pre></div></div>
|
||||
</div>
|
||||
<!-- window showing the filter options -->
|
||||
@ -136,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -362,7 +362,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -139,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -515,7 +515,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -242,7 +242,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -242,7 +242,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -242,7 +242,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:33 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -136,7 +136,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -248,7 +248,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -181,7 +181,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -238,7 +238,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -161,7 +161,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -194,7 +194,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -193,7 +193,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -232,7 +232,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -231,7 +231,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -303,7 +303,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -260,7 +260,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -297,7 +297,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -137,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -81,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -113,7 +113,7 @@ Using DS3232 instead of DS1307</h2>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -81,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -81,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -81,7 +81,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -160,7 +160,7 @@ CylonChase cylonEyes(pins, <span class="keyword">sizeof</span>(pins), 100);
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -226,7 +226,7 @@ NacelleChaseLEDs nacelleChase(nacelleChasePins, NACELLE_CHASE_LEN);
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -123,7 +123,7 @@ This is the complete list of members for <a class="el" href="classBitmap.html">B
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -1328,8 +1328,8 @@ class </td><td class="memItemRight" valign="bottom"><a class="el" href="cla
|
||||
<p>Sets the <em>font</em> for use with <a class="el" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText()</a> and <a class="el" href="classBitmap.html#a1a11f29863ee7f36a3b15c91963102bd" title="Draws a single character ch at (x, y).">drawChar()</a>. </p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <DejaVuSans9.h></span>
|
||||
|
||||
display.setFont(DejaVuSans9);
|
||||
display.drawText(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(DejaVuSans9);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
</pre></div><p>New fonts can be generated with <a href="https://code.google.com/p/glcd-arduino/downloads/detail?name=GLCDFontCreator2.zip&can=2&q=">GLCDFontCreator2</a>.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBitmap.html#ab6bd47cb892b47b4c69b422ace182b87" title="Returns the currently selected font, or null if none selected.">font()</a>, <a class="el" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText()</a>, <a class="el" href="classBitmap.html#a1a11f29863ee7f36a3b15c91963102bd" title="Draws a single character ch at (x, y).">drawChar()</a> </dd></dl>
|
||||
|
||||
@ -1591,7 +1591,7 @@ class </td><td class="memItemRight" valign="bottom"><a class="el" href="cla
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -90,7 +90,7 @@ This is the complete list of members for <a class="el" href="classBlinkLED.html"
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -378,7 +378,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -100,7 +100,7 @@ This is the complete list of members for <a class="el" href="classBoolField.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -410,7 +410,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -86,7 +86,7 @@ This is the complete list of members for <a class="el" href="classChaseLEDs.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -304,7 +304,7 @@ Protected Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -75,6 +75,7 @@ This is the complete list of members for <a class="el" href="classDMD.html">DMD<
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a5eeed27c176eb6e4a2c39ea83444e27d">data</a>()</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a20fea2a946545aa3b5edd78245149e5f">data</a>() const </td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33">disableTimer1</a>()</td><td><a class="el" href="classDMD.html">DMD</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#a52fe885bfb380b74df54c96221811cff">disableTimer2</a>()</td><td><a class="el" href="classDMD.html">DMD</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#affd37accffe951c8878434dfa1245809">DMD</a>(int widthPanels=1, int heightPanels=1)</td><td><a class="el" href="classDMD.html">DMD</a></td><td><code> [explicit]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#aab1f3ba29c053d630ae12865d22166ec">doubleBuffer</a>() const </td><td><a class="el" href="classDMD.html">DMD</a></td><td><code> [inline]</code></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72">drawBitmap</a>(int x, int y, const Bitmap &bitmap, Color color=White)</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td></td></tr>
|
||||
@ -90,6 +91,7 @@ This is the complete list of members for <a class="el" href="classDMD.html">DMD<
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0">drawText</a>(int x, int y, const char *str, int len=-1)</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a802f5d6bd19a3727670e61e7a88a0cac">drawText</a>(int x, int y, const String &str, int start=0, int len=-1)</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2">enableTimer1</a>()</td><td><a class="el" href="classDMD.html">DMD</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97">enableTimer2</a>()</td><td><a class="el" href="classDMD.html">DMD</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#a99da820f9280aace6b512801d5a5e2b2">fill</a>(int x, int y, int width, int height, Color color)</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#aadcad6c9e1f10f0ddbb789401132aa6f">fill</a>(int x, int y, int width, int height, const prog_uint8_t *pattern, Color color=White)</td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td></td></tr>
|
||||
<tr class="memlist"><td><a class="el" href="classBitmap.html#ab6bd47cb892b47b4c69b422ace182b87">font</a>() const </td><td><a class="el" href="classBitmap.html">Bitmap</a></td><td><code> [inline]</code></td></tr>
|
||||
@ -133,7 +135,7 @@ This is the complete list of members for <a class="el" href="classDMD.html">DMD<
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -107,6 +107,10 @@ Public Member Functions</h2></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables Timer1 overflow interrupts for updating this display. <a href="#a4c3b04b384f3d656a9b59690836775e2"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33">disableTimer1</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disables Timer1 overflow interrupts. <a href="#a39af27e216f654ecc7e60b0614cb6b33"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97">enableTimer2</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables Timer2 overflow interrupts for updating this display. <a href="#a5469775db7fafebca2cdbc6a6372fb97"></a><br/></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDMD.html#a52fe885bfb380b74df54c96221811cff">disableTimer2</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disables Timer2 overflow interrupts. <a href="#a52fe885bfb380b74df54c96221811cff"></a><br/></td></tr>
|
||||
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
|
||||
Static Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classBitmap.html#a88d386944a7017aa776a177b10d8b2ba">Color</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDMD.html#a557412f734fc4596e1102bf71e110ea0">fromRGB</a> (uint8_t r, uint8_t g, uint8_t b)</td></tr>
|
||||
@ -146,6 +150,19 @@ Interrupt-driven display refresh</h2>
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
display.<a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1</a>();
|
||||
}
|
||||
</pre></div><p>If Timer1 is already in use by some other part of your application, then Timer2 can be used as an alternative interrupt source:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <DMD.h></span>
|
||||
|
||||
<a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display;
|
||||
|
||||
ISR(TIMER2_OVF_vect)
|
||||
{
|
||||
display.<a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
display.<a class="code" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">enableTimer2</a>();
|
||||
}
|
||||
</pre></div><p><a class="el" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> can also be used with third-party timer libraries such as <a href="http://code.google.com/p/arduino-timerone/downloads/list">TimerOne</a>:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <DMD.h></span>
|
||||
<span class="preprocessor"> #include <TimerOne.h></span>
|
||||
@ -241,7 +258,7 @@ Multiple panels</h2>
|
||||
<p>Note: the parameters to this constructor are specified in panels, whereas <a class="el" href="classBitmap.html#a76c3b49e535761f07c553e7336daf523" title="Returns the width of the bitmap in pixels.">width()</a> and <a class="el" href="classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3" title="Returns the height of the bitmap in pixels.">height()</a> are specified in pixels.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBitmap.html#a76c3b49e535761f07c553e7336daf523" title="Returns the width of the bitmap in pixels.">width()</a>, <a class="el" href="classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3" title="Returns the height of the bitmap in pixels.">height()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00219">219</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00237">237</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -263,7 +280,28 @@ Multiple panels</h2>
|
||||
<p>Disables Timer1 overflow interrupts. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00596">596</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00614">614</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a52fe885bfb380b74df54c96221811cff"></a><!-- doxytag: member="DMD::disableTimer2" ref="a52fe885bfb380b74df54c96221811cff" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void DMD::disableTimer2 </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Disables Timer2 overflow interrupts. </p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">enableTimer2()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00674">674</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -317,9 +355,44 @@ Multiple panels</h2>
|
||||
display.<a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1</a>();
|
||||
}
|
||||
</pre></div><p>If timer interrupts are being used to update the display, then it is unnecessary to call <a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop()</a>.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a>, <a class="el" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33" title="Disables Timer1 overflow interrupts.">disableTimer1()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> </dd></dl>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a>, <a class="el" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33" title="Disables Timer1 overflow interrupts.">disableTimer1()</a>, <a class="el" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">enableTimer2()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00545">545</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00563">563</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="a5469775db7fafebca2cdbc6a6372fb97"></a><!-- doxytag: member="DMD::enableTimer2" ref="a5469775db7fafebca2cdbc6a6372fb97" args="()" -->
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void DMD::enableTimer2 </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="memdoc">
|
||||
|
||||
<p>Enables Timer2 overflow interrupts for updating this display. </p>
|
||||
<p>The application must also provide an interrupt service routine for Timer2 that calls <a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a>:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <DMD.h></span>
|
||||
|
||||
<a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display;
|
||||
|
||||
ISR(TIMER2_OVF_vect)
|
||||
{
|
||||
display.<a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
display.<a class="code" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97" title="Enables Timer2 overflow interrupts for updating this display.">enableTimer2</a>();
|
||||
}
|
||||
</pre></div><p>If timer interrupts are being used to update the display, then it is unnecessary to call <a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop()</a>.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a>, <a class="el" href="classDMD.html#a52fe885bfb380b74df54c96221811cff" title="Disables Timer2 overflow interrupts.">disableTimer2()</a>, <a class="el" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00646">646</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -358,7 +431,7 @@ Multiple panels</h2>
|
||||
<p>Returns <a class="el" href="classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7">White</a> if any of <em>r</em>, <em>g</em>, or <em>b</em> are non-zero; otherwise returns <a class="el" href="classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc">Black</a>.</p>
|
||||
<p>This function is provided for upwards compatibility with future displays that support full color. Monochrome applications should use the <a class="el" href="classBitmap.html#a2c7faeeb89d3624b5bbca58871785adc">Black</a> and <a class="el" href="classBitmap.html#a39b6754cfe50a457bbfdb1980fd87eb7">White</a> constants directly. </p>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00612">612</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00690">690</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -385,7 +458,7 @@ Multiple panels</h2>
|
||||
</pre></div><p>If you are using a timer interrupt service routine, then call <a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a> in response to the interrupt instead of calling <a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop()</a>.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00402">402</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00420">420</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -408,7 +481,7 @@ Multiple panels</h2>
|
||||
<p>If this function is called from an interrupt service routine, then it is recommended that double-buffering be enabled with <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> to prevent "tearing" artifacts that result from simultaneous update of a single shared buffer.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a>, <a class="el" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00460">460</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00478">478</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -433,7 +506,7 @@ Multiple panels</h2>
|
||||
<p>This function will allocate memory for the extra buffer when <em>doubleBuffer</em> is true. If there is insufficient memory for the second screen buffer, then this class will revert to single-buffered mode.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#aab1f3ba29c053d630ae12865d22166ec" title="Returns true if the display is double-buffered; false if single-buffered. The default is false...">doubleBuffer()</a>, <a class="el" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">swapBuffers()</a>, <a class="el" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00296">296</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00314">314</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -456,7 +529,7 @@ Multiple panels</h2>
|
||||
<p>The new rendering back buffer will have undefined contents and will probably need to be re-inialized with <a class="el" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear()</a> or <a class="el" href="classBitmap.html#a99da820f9280aace6b512801d5a5e2b2" title="Fills the width x height pixels starting at top-left corner (x, y) with color.">fill()</a> before drawing to it. The <a class="el" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736" title="Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...">swapBuffersAndCopy()</a> function can be used instead to preserve the screen contents from one frame to the next.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a0b1771cf790b2b62eea55e56b02e3736" title="Swaps the buffers that are used for rendering to the display and copies the former back buffer conten...">swapBuffersAndCopy()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00345">345</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00363">363</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -479,7 +552,7 @@ Multiple panels</h2>
|
||||
<p>This function is useful if the screen does not change much from one frame to the next. If the screen changes a lot between frames, then it is usually better to explicitly <a class="el" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear()</a> or <a class="el" href="classBitmap.html#a99da820f9280aace6b512801d5a5e2b2" title="Fills the width x height pixels starting at top-left corner (x, y) with color.">fill()</a> the new back buffer.</p>
|
||||
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classDMD.html#a80269ccd44b3ef9ee15f0a1009b7a60a" title="Swaps the buffers that are used for rendering to the display.">swapBuffers()</a>, <a class="el" href="classDMD.html#a6fbdcf8832f91d02500cb7a9b84d2723" title="Enables or disables double-buffering according to doubleBuffer.">setDoubleBuffer()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00378">378</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
<p>Definition at line <a class="el" href="DMD_8cpp_source.html#l00396">396</a> of file <a class="el" href="DMD_8cpp_source.html">DMD.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -502,7 +575,7 @@ Multiple panels</h2>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -103,7 +103,7 @@ This is the complete list of members for <a class="el" href="classDS1307RTC.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -449,7 +449,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -108,7 +108,7 @@ This is the complete list of members for <a class="el" href="classDS3232RTC.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -596,7 +596,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -93,7 +93,7 @@ This is the complete list of members for <a class="el" href="classField.html">Fi
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -360,7 +360,7 @@ class </td><td class="memItemRight" valign="bottom"><a class="el" href="cla
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -95,7 +95,7 @@ This is the complete list of members for <a class="el" href="classForm.html">For
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -440,7 +440,7 @@ class </td><td class="memItemRight" valign="bottom"><a class="el" href="cla
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -87,7 +87,7 @@ This is the complete list of members for <a class="el" href="classI2CMaster.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -269,7 +269,7 @@ virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -105,7 +105,7 @@ This is the complete list of members for <a class="el" href="classIntField.html"
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -510,7 +510,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -94,7 +94,7 @@ This is the complete list of members for <a class="el" href="classLCD.html">LCD<
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -406,7 +406,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -98,7 +98,7 @@ This is the complete list of members for <a class="el" href="classListField.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -322,7 +322,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -90,7 +90,7 @@ This is the complete list of members for <a class="el" href="classMelody.html">M
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -343,7 +343,7 @@ bool </td><td class="memItemRight" valign="bottom"><a class="el" href="clas
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -101,7 +101,7 @@ This is the complete list of members for <a class="el" href="classRTC.html">RTC<
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -582,7 +582,7 @@ static const uint8_t </td><td class="memItemRight" valign="bottom"><a class
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -83,7 +83,7 @@ This is the complete list of members for <a class="el" href="structRTCAlarm.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -83,7 +83,7 @@ This is the complete list of members for <a class="el" href="structRTCDate.html"
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -83,7 +83,7 @@ This is the complete list of members for <a class="el" href="structRTCTime.html"
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -88,7 +88,7 @@ This is the complete list of members for <a class="el" href="classSoftI2C.html">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -286,7 +286,7 @@ unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" hr
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -96,7 +96,7 @@ This is the complete list of members for <a class="el" href="classTextField.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -268,7 +268,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -100,7 +100,7 @@ This is the complete list of members for <a class="el" href="classTimeField.html
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -432,7 +432,7 @@ Public Member Functions</h2></td></tr>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -92,7 +92,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
88
dmd-demo_8dox.html
Normal file
88
dmd-demo_8dox.html
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>ArduinoLibs: dmd-demo.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<script type="text/javascript"><!--
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
--></script>
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">ArduinoLibs</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li id="searchli">
|
||||
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">dmd-demo.dox File Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
</table>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock">
|
||||
<p>Definition in file <a class="el" href="dmd-demo_8dox_source.html">dmd-demo.dox</a>.</p>
|
||||
</div></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
88
dmd-running-figure_8dox.html
Normal file
88
dmd-running-figure_8dox.html
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>ArduinoLibs: dmd-running-figure.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<script type="text/javascript"><!--
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
--></script>
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">ArduinoLibs</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li id="searchli">
|
||||
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="navrow2" class="tabs2">
|
||||
<ul class="tablist">
|
||||
<li><a href="files.html"><span>File List</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">dmd-running-figure.dox File Reference</div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
</table>
|
||||
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<div class="textblock">
|
||||
<p>Definition in file <a class="el" href="dmd-running-figure_8dox_source.html">dmd-running-figure.dox</a>.</p>
|
||||
</div></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
232
dmd_demo.html
Normal file
232
dmd_demo.html
Normal file
@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>ArduinoLibs: Dot Matrix Display Demo</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<script type="text/javascript"><!--
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
--></script>
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">ArduinoLibs</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
<li id="searchli">
|
||||
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Dot Matrix Display Demo </div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This demo shows off various features of drawing with the <a class="el" href="classBitmap.html" title="Represents a monochrome bitmap within main memory.">Bitmap</a> class to a <a class="el" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display:</p>
|
||||
<ul>
|
||||
<li>Drawing circles, lines, and rectangles. </li>
|
||||
<li>Filling the screen with a bitmap-based brick pattern. </li>
|
||||
<li>Drawing bitmaps directly from program memory. </li>
|
||||
<li>Drawing text in various fonts. </li>
|
||||
<li>Scrolling text in a "marquee".</li>
|
||||
</ul>
|
||||
<p><a class="el" href="dmd_running_figure.html">RunningFigure</a> provides another example of drawing and animating bitmaps.</p>
|
||||
<p>The full source code for the demo follows:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="comment">/*</span>
|
||||
<span class="comment">This example demonstrates how to use the DMD and related classes to</span>
|
||||
<span class="comment">draw things on a Freetronics Large Dot Matrix Display.</span>
|
||||
<span class="comment"></span>
|
||||
<span class="comment">This example is placed into the public domain.</span>
|
||||
<span class="comment">*/</span>
|
||||
|
||||
<span class="preprocessor">#include <DMD.h></span>
|
||||
<span class="preprocessor">#include <DejaVuSans9.h></span>
|
||||
<span class="preprocessor">#include <DejaVuSansBold9.h></span>
|
||||
<span class="preprocessor">#include <DejaVuSansItalic9.h></span>
|
||||
<span class="preprocessor">#include <Mono5x7.h></span>
|
||||
|
||||
<a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display;
|
||||
|
||||
ISR(TIMER1_OVF_vect)
|
||||
{
|
||||
display.<a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
display.<a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> loop() {
|
||||
drawShapes();
|
||||
delay(1000);
|
||||
|
||||
drawBricks();
|
||||
delay(1000);
|
||||
|
||||
drawStickFigures();
|
||||
delay(1000);
|
||||
|
||||
drawText();
|
||||
delay(1000);
|
||||
|
||||
drawBoldText();
|
||||
delay(1000);
|
||||
|
||||
drawItalicText();
|
||||
delay(1000);
|
||||
|
||||
drawMonoText();
|
||||
delay(1000);
|
||||
|
||||
drawMarquee();
|
||||
delay(500);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawShapes()
|
||||
{
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#a933763a4f3cba79fbcf97ae6d0a864aa" title="Draws a circle with a specific center (centerX, centerY) and radius, with the outline in borderColor ...">drawCircle</a>(6, 8, 3);
|
||||
display.<a class="code" href="classBitmap.html#a757291b9a39bcb0d64ac98d3a2fa061b" title="Draws a filled circle with a specific center (centerX, centerY) and radius in color.">drawFilledCircle</a>(16, 8, 3);
|
||||
display.<a class="code" href="classBitmap.html#aa0a84f3694e343d68e7021552c69f767" title="Draws a line from (x1, y1) to (x2, y2) in color.">drawLine</a>(22, 5, 28, 11);
|
||||
display.<a class="code" href="classBitmap.html#aa0a84f3694e343d68e7021552c69f767" title="Draws a line from (x1, y1) to (x2, y2) in color.">drawLine</a>(28, 5, 22, 11);
|
||||
display.<a class="code" href="classBitmap.html#aac61e3f7f625db568e37d88b52b3b2fc" title="Draws a rectangle from (x1, y1) to (x2, y2), with the outline in borderColor and the interior filled ...">drawRect</a>(0, 0, display.<a class="code" href="classBitmap.html#a76c3b49e535761f07c553e7336daf523" title="Returns the width of the bitmap in pixels.">width</a>() - 1, display.<a class="code" href="classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3" title="Returns the height of the bitmap in pixels.">height</a>() - 1);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawBricks()
|
||||
{
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> uint8_t bricks[] PROGMEM = {
|
||||
16, 6,
|
||||
B11111111, B11111111,
|
||||
B10000000, B10000000,
|
||||
B10000000, B10000000,
|
||||
B11111111, B11111111,
|
||||
B00001000, B00001000,
|
||||
B00001000, B00001000
|
||||
};
|
||||
display.<a class="code" href="classBitmap.html#a99da820f9280aace6b512801d5a5e2b2" title="Fills the width x height pixels starting at top-left corner (x, y) with color.">fill</a>(0, 0, display.<a class="code" href="classBitmap.html#a76c3b49e535761f07c553e7336daf523" title="Returns the width of the bitmap in pixels.">width</a>(), display.<a class="code" href="classBitmap.html#adcd4e3dc7594421e647b0f52da9a41a3" title="Returns the height of the bitmap in pixels.">height</a>(), bricks);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawStickFigures()
|
||||
{
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> uint8_t stickFigure[] PROGMEM = {
|
||||
9, 13,
|
||||
B00111110, B00000000,
|
||||
B01000001, B00000000,
|
||||
B01000001, B00000000,
|
||||
B00111110, B00000000,
|
||||
B00001000, B00000000,
|
||||
B00001000, B00000000,
|
||||
B11111111, B10000000,
|
||||
B00001000, B00000000,
|
||||
B00001000, B00000000,
|
||||
B00010100, B00000000,
|
||||
B00100010, B00000000,
|
||||
B01000001, B00000000,
|
||||
B10000000, B10000000
|
||||
};
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72" title="Draws bitmap at (x, y) in color.">drawBitmap</a>(2, 1, stickFigure);
|
||||
display.<a class="code" href="classBitmap.html#a4321640464bc08b60348c09bff01b86a" title="Draws bitmap at (x, y) in inverted colors.">drawInvertedBitmap</a>(12, 1, stickFigure);
|
||||
display.<a class="code" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72" title="Draws bitmap at (x, y) in color.">drawBitmap</a>(22, 1, stickFigure);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawText()
|
||||
{
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(DejaVuSans9);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(9, 8, <span class="stringliteral">"World"</span>);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawBoldText()
|
||||
{
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(DejaVuSansBold9);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(4, 8, <span class="stringliteral">"World"</span>);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawItalicText()
|
||||
{
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(DejaVuSansItalic9);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(2, 8, <span class="stringliteral">"World"</span>);
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> drawMonoText()
|
||||
{
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(Mono5x7);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(0, 0, <span class="stringliteral">"Hello"</span>);
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(3, 8, <span class="stringliteral">"World"</span>);
|
||||
}
|
||||
|
||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> message[] = <span class="stringliteral">"Eat at Joes!"</span>;
|
||||
|
||||
<span class="keywordtype">void</span> drawMarquee()
|
||||
{
|
||||
<span class="keywordtype">int</span> width = display.<a class="code" href="classBitmap.html#a76c3b49e535761f07c553e7336daf523" title="Returns the width of the bitmap in pixels.">width</a>();
|
||||
display.<a class="code" href="classBitmap.html#abf7adfceb267080aa9806388e96358c4" title="Sets the font for use with drawText() and drawChar().">setFont</a>(DejaVuSans9);
|
||||
<span class="keywordtype">int</span> msgWidth = display.<a class="code" href="classBitmap.html#a0f7607b1c7867987f4500d490a666e8a" title="Returns the width in pixels of the len characters of str in the current font(), including inter-chara...">textWidth</a>(message);
|
||||
<span class="keywordtype">int</span> fullScroll = msgWidth + width + 1;
|
||||
<span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x < fullScroll; ++x) {
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
display.<a class="code" href="classBitmap.html#a3e9bcbfb584d5020bd6f0a313ee275f0" title="Draws the len characters of str at (x, y).">drawText</a>(width - x, 3, message);
|
||||
delay(50);
|
||||
}
|
||||
}
|
||||
</pre></div> </div></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
426
dmd_running_figure.html
Normal file
426
dmd_running_figure.html
Normal file
@ -0,0 +1,426 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>ArduinoLibs: Running figure example</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<!-- Generated by Doxygen 1.7.4 -->
|
||||
<script type="text/javascript"><!--
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
--></script>
|
||||
<div id="top">
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">ArduinoLibs</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
<li id="searchli">
|
||||
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Running figure example </div> </div>
|
||||
</div>
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This example demonstrates how to draw animated bitmaps to <a href="http://www.freetronics.com/dmd">Freetronics Large Dot Matrix Displays</a>. These displays have 512 LED's arranged in a 32x16 matrix and controlled by an SPI interface. The displays are available in red, blue, green, yellow, and white variations.</p>
|
||||
<p>The first step is to initialize the display:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <DMD.h></span>
|
||||
|
||||
<a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display;
|
||||
</pre></div></p>
|
||||
<p>We will also need some bitmaps to animate the running figure. We will use static bitmaps stored in program memory. The first frame of the 10-frame animation is:</p>
|
||||
<div class="fragment"><pre class="fragment">byte <span class="keyword">const</span> run1[] PROGMEM = {
|
||||
16, 16,
|
||||
B00000000, B00001100,
|
||||
B00000000, B00011110,
|
||||
B00000111, B11111110,
|
||||
B00001111, B11111110,
|
||||
B00011100, B11111100,
|
||||
B00000001, B11111100,
|
||||
B00000001, B11110000,
|
||||
B00000011, B11111000,
|
||||
B00000111, B00011000,
|
||||
B00001110, B01110000,
|
||||
B00011100, B01100000,
|
||||
B00111000, B00000000,
|
||||
B01110000, B00000000,
|
||||
B01100000, B00000000,
|
||||
B01000000, B00000000,
|
||||
B00000000, B00000000
|
||||
};
|
||||
</pre></div></p>
|
||||
<p>As can be seen, the bitmap is made up of 0's and 1's; a 1 bit indicates that the corresponding LED will be lit when it is drawn to the dot matrix display. The first two bytes are the width and height of the bitmap in pixels. In this case, the first frame is 16x16 pixels. Other frames in the animation are 18x16 and 13x16.</p>
|
||||
<p>We store pointers to all of the frames in a common array:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="keyword">const</span> prog_uint8_t *frames[] = {
|
||||
run1,
|
||||
run2,
|
||||
run3,
|
||||
run4,
|
||||
run5,
|
||||
run6,
|
||||
run7,
|
||||
run8,
|
||||
run9,
|
||||
run10
|
||||
};
|
||||
<span class="preprocessor">#define NUM_FRAMES (sizeof(frames) / sizeof(frames[0]))</span>
|
||||
<span class="preprocessor">unsigned int frame = 0;</span>
|
||||
</pre></div></p>
|
||||
<p>All that remains is to run the animation loop:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor">#define ADVANCE_MS (1000 / NUM_FRAMES)</span>
|
||||
<span class="preprocessor"></span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastFrame;
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
lastFrame = millis() - ADVANCE_MS;
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> loop() {
|
||||
<span class="keywordflow">if</span> ((millis() - lastFrame) >= ADVANCE_MS) {
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
<span class="keywordtype">int</span> x = (32 - pgm_read_byte(frames[frame])) / 2;
|
||||
display.<a class="code" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72" title="Draws bitmap at (x, y) in color.">drawBitmap</a>(x, 0, frames[frame]);
|
||||
lastFrame += ADVANCE_MS;
|
||||
frame = (frame + 1) % NUM_FRAMES;
|
||||
}
|
||||
display.<a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop</a>();
|
||||
}
|
||||
</pre></div></p>
|
||||
<p>Each time <code>ADVANCE_MS</code> milliseconds expires, we clear the display and draw a bitmap centered on the screen. To help with the centering, we read the width value from the bitmap for the current frame (the height is always 16). We must also call <a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">DMD::loop()</a> repeatedly from the application's main <code>loop()</code> function to ensure that the display is kept refreshed.</p>
|
||||
<p>Sometimes it can be inconvenient to arrange for <a class="el" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">DMD::loop()</a> to be called regularly. An alternative is to use Timer1 or Timer2 and <a class="el" href="classDMD.html#dmd_interrupts">interrupt-driven display refresh</a>:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="preprocessor">#define ADVANCE_MS (1000 / NUM_FRAMES)</span>
|
||||
<span class="preprocessor"></span>
|
||||
ISR(TIMER1_OVF_vect)
|
||||
{
|
||||
display.<a class="code" href="classDMD.html#a9e4bf2a9d247312d35c1401ff61261c8" title="Refresh the display.">refresh</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
display.<a class="code" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2" title="Enables Timer1 overflow interrupts for updating this display.">enableTimer1</a>();
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> loop() {
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
<span class="keywordtype">int</span> x = (32 - pgm_read_byte(frames[frame])) / 2;
|
||||
display.<a class="code" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72" title="Draws bitmap at (x, y) in color.">drawBitmap</a>(x, 0, frames[frame]);
|
||||
frame = (frame + 1) % NUM_FRAMES;
|
||||
|
||||
delay(ADVANCE_MS);
|
||||
}
|
||||
</pre></div></p>
|
||||
<p>In the case of Timer2, <code>TIMER2_OVF_vect</code> and <a class="el" href="classDMD.html#a5469775db7fafebca2cdbc6a6372fb97">enableTimer2()</a> would be used in place of <code>TIMER1_OVF_vect</code> and <a class="el" href="classDMD.html#a4c3b04b384f3d656a9b59690836775e2">enableTimer1()</a>.</p>
|
||||
<p>The full source code for the example follows:</p>
|
||||
<div class="fragment"><pre class="fragment"><span class="comment">/*</span>
|
||||
<span class="comment"> * Copyright (C) 2012 Southern Storm Software, Pty Ltd.</span>
|
||||
<span class="comment"> *</span>
|
||||
<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span>
|
||||
<span class="comment"> * copy of this software and associated documentation files (the "Software"),</span>
|
||||
<span class="comment"> * to deal in the Software without restriction, including without limitation</span>
|
||||
<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span>
|
||||
<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span>
|
||||
<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span>
|
||||
<span class="comment"> *</span>
|
||||
<span class="comment"> * The above copyright notice and this permission notice shall be included</span>
|
||||
<span class="comment"> * in all copies or substantial portions of the Software.</span>
|
||||
<span class="comment"> *</span>
|
||||
<span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span>
|
||||
<span class="comment"> * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
|
||||
<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
|
||||
<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
|
||||
<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span>
|
||||
<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span>
|
||||
<span class="comment"> * DEALINGS IN THE SOFTWARE.</span>
|
||||
<span class="comment"> */</span>
|
||||
|
||||
<span class="preprocessor">#include <DMD.h></span>
|
||||
|
||||
<a class="code" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> display;
|
||||
|
||||
<span class="comment">// Running stick figure pictures are loosely based on those from this tutorial:</span>
|
||||
<span class="comment">// http://www.fluidanims.com/FAelite/phpBB3/viewtopic.php?f=10&t=102</span>
|
||||
|
||||
byte <span class="keyword">const</span> run1[] PROGMEM = {
|
||||
16, 16,
|
||||
B00000000, B00001100,
|
||||
B00000000, B00011110,
|
||||
B00000111, B11111110,
|
||||
B00001111, B11111110,
|
||||
B00011100, B11111100,
|
||||
B00000001, B11111100,
|
||||
B00000001, B11110000,
|
||||
B00000011, B11111000,
|
||||
B00000111, B00011000,
|
||||
B00001110, B01110000,
|
||||
B00011100, B01100000,
|
||||
B00111000, B00000000,
|
||||
B01110000, B00000000,
|
||||
B01100000, B00000000,
|
||||
B01000000, B00000000,
|
||||
B00000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run2[] PROGMEM = {
|
||||
18, 16,
|
||||
B00000000, B01110011, B10000000,
|
||||
B00000000, B11111111, B10000000,
|
||||
B00000000, B00011111, B10000000,
|
||||
B00000000, B00111111, B11000000,
|
||||
B00000000, B01111011, B11000000,
|
||||
B00000000, B11110011, B10000000,
|
||||
B00000001, B11100000, B00000000,
|
||||
B00000011, B11100000, B00000000,
|
||||
B00000111, B01110000, B00000000,
|
||||
B01111110, B00111000, B00000000,
|
||||
B11111100, B00011100, B00000000,
|
||||
B00000000, B00001110, B00000000,
|
||||
B00000000, B00000111, B00000000,
|
||||
B00000000, B00000011, B10000000,
|
||||
B00000000, B00000001, B00000000,
|
||||
B00000000, B00000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run3[] PROGMEM = {
|
||||
18, 16,
|
||||
B00000000, B00110000, B00000000,
|
||||
B00000000, B01111000, B00000000,
|
||||
B00000000, B00011111, B00000000,
|
||||
B00000000, B00011111, B00000000,
|
||||
B00000000, B00111111, B10000000,
|
||||
B00000000, B01111111, B11000000,
|
||||
B00000000, B11100011, B10000000,
|
||||
B00000001, B11000000, B00000000,
|
||||
B00000011, B11100000, B00000000,
|
||||
B11111111, B01110000, B00000000,
|
||||
B11111110, B00111000, B00000000,
|
||||
B00000000, B00011000, B00000000,
|
||||
B00000000, B00011100, B00000000,
|
||||
B00000000, B00001110, B00000000,
|
||||
B00000000, B00000100, B00000000,
|
||||
B00000000, B00000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run4[] PROGMEM = {
|
||||
16, 16,
|
||||
B00000001, B11100000,
|
||||
B00000011, B11111100,
|
||||
B00000000, B00111110,
|
||||
B00000000, B01111110,
|
||||
B00000000, B11111100,
|
||||
B00000001, B10011111,
|
||||
B00000011, B00001110,
|
||||
B00000011, B00000000,
|
||||
B00000011, B10000000,
|
||||
B11111111, B10000000,
|
||||
B11111000, B11000000,
|
||||
B00000001, B11000000,
|
||||
B00000011, B10000000,
|
||||
B00000111, B00000000,
|
||||
B00000110, B00000000,
|
||||
B00000100, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run5[] PROGMEM = {
|
||||
13, 16,
|
||||
B00000000, B00000000,
|
||||
B00000000, B00110000,
|
||||
B00000111, B11111000,
|
||||
B00000111, B11111000,
|
||||
B00000111, B11110000,
|
||||
B00001111, B11100000,
|
||||
B00000111, B00000000,
|
||||
B00001111, B00000000,
|
||||
B00001111, B00000000,
|
||||
B00001111, B10000000,
|
||||
B00011100, B00000000,
|
||||
B00111000, B00000000,
|
||||
B01110000, B00000000,
|
||||
B11100000, B00000000,
|
||||
B11000000, B00000000,
|
||||
B10000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run6[] PROGMEM = {
|
||||
16, 16,
|
||||
B00000000, B00000000,
|
||||
B00000000, B00011100,
|
||||
B00000000, B00111110,
|
||||
B00000001, B11111110,
|
||||
B00000000, B11100000,
|
||||
B00000001, B11100000,
|
||||
B00000001, B11111000,
|
||||
B00000011, B00011100,
|
||||
B00000110, B00111000,
|
||||
B00000110, B01110000,
|
||||
B00001100, B00100000,
|
||||
B00111000, B00000000,
|
||||
B01100000, B00000000,
|
||||
B11000000, B00000000,
|
||||
B10000000, B00000000,
|
||||
B10000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run7[] PROGMEM = {
|
||||
18, 16,
|
||||
B00000000, B00000011, B10000000,
|
||||
B00000000, B01111011, B10000000,
|
||||
B00000000, B01111111, B10000000,
|
||||
B00000000, B00001111, B00100000,
|
||||
B00000000, B00011001, B11000000,
|
||||
B00000000, B00110000, B11000000,
|
||||
B00000000, B01110000, B00000000,
|
||||
B00000001, B11110000, B00000000,
|
||||
B11111111, B10111000, B00000000,
|
||||
B11111111, B00011100, B00000000,
|
||||
B00000000, B00001110, B00000000,
|
||||
B00000000, B00000111, B00000000,
|
||||
B00000000, B00000011, B10000000,
|
||||
B00000000, B00000001, B11000000,
|
||||
B00000000, B00000000, B01000000,
|
||||
B00000000, B00000000, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run8[] PROGMEM = {
|
||||
18, 16,
|
||||
B00000000, B00000110, B00000000,
|
||||
B00000001, B11101111, B00000000,
|
||||
B00000001, B11111111, B00000000,
|
||||
B00000000, B00111110, B00000000,
|
||||
B00000000, B01111111, B11000000,
|
||||
B00000000, B11100011, B10000000,
|
||||
B00000001, B11000000, B00000000,
|
||||
B00000011, B11100000, B00000000,
|
||||
B11111111, B01110000, B00000000,
|
||||
B11111110, B00111000, B00000000,
|
||||
B00000000, B00011100, B00000000,
|
||||
B00000000, B00000110, B00000000,
|
||||
B00000000, B00000110, B00000000,
|
||||
B00000000, B00000111, B00000000,
|
||||
B00000000, B00000011, B00000000,
|
||||
B00000000, B00000001, B00000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run9[] PROGMEM = {
|
||||
16, 16,
|
||||
B00000000, B00000000,
|
||||
B00000000, B01001110,
|
||||
B00000001, B11101110,
|
||||
B00000011, B11111110,
|
||||
B00000011, B11111110,
|
||||
B00000001, B10111100,
|
||||
B00000011, B00000000,
|
||||
B00000111, B00000000,
|
||||
B11111111, B10000000,
|
||||
B11111100, B11000000,
|
||||
B00000000, B11000000,
|
||||
B00000000, B11000000,
|
||||
B00000000, B11000000,
|
||||
B00000000, B11000000,
|
||||
B00000000, B11000000,
|
||||
B00000000, B11000000
|
||||
};
|
||||
|
||||
byte <span class="keyword">const</span> run10[] PROGMEM = {
|
||||
13, 16,
|
||||
B00000000, B00000000,
|
||||
B00000000, B00110000,
|
||||
B00000000, B01111000,
|
||||
B00000111, B11111000,
|
||||
B00001111, B11111000,
|
||||
B00000111, B11000000,
|
||||
B00001110, B00000000,
|
||||
B00001100, B00000000,
|
||||
B00001100, B00000000,
|
||||
B01111100, B00000000,
|
||||
B11111100, B00000000,
|
||||
B00011000, B00000000,
|
||||
B00110000, B00000000,
|
||||
B01110000, B00000000,
|
||||
B01100000, B00000000,
|
||||
B01000000, B00000000
|
||||
};
|
||||
|
||||
<span class="keyword">const</span> prog_uint8_t *frames[] = {
|
||||
run1,
|
||||
run2,
|
||||
run3,
|
||||
run4,
|
||||
run5,
|
||||
run6,
|
||||
run7,
|
||||
run8,
|
||||
run9,
|
||||
run10
|
||||
};
|
||||
<span class="preprocessor">#define NUM_FRAMES (sizeof(frames) / sizeof(frames[0]))</span>
|
||||
<span class="preprocessor"></span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frame = 0;
|
||||
|
||||
<span class="preprocessor">#define ADVANCE_MS (1000 / NUM_FRAMES)</span>
|
||||
<span class="preprocessor"></span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastFrame;
|
||||
|
||||
<span class="keywordtype">void</span> setup() {
|
||||
lastFrame = millis() - ADVANCE_MS;
|
||||
}
|
||||
|
||||
<span class="keywordtype">void</span> loop() {
|
||||
<span class="keywordflow">if</span> ((millis() - lastFrame) >= ADVANCE_MS) {
|
||||
display.<a class="code" href="classBitmap.html#a839dc8fab05a5ebf7a6b2e61436b2fa1" title="Clears the entire bitmap to the specified color.">clear</a>();
|
||||
<span class="keywordtype">int</span> x = (32 - pgm_read_byte(frames[frame])) / 2;
|
||||
display.<a class="code" href="classBitmap.html#a491e9c0bb20ddf5a5eb4933077c8ed72" title="Draws bitmap at (x, y) in color.">drawBitmap</a>(x, 0, frames[frame]);
|
||||
lastFrame += ADVANCE_MS;
|
||||
frame = (frame + 1) % NUM_FRAMES;
|
||||
}
|
||||
display.<a class="code" href="classDMD.html#a2c74a0845ef6080056b972d490648114" title="Performs regular display refresh activities from the application's main loop.">loop</a>();
|
||||
}
|
||||
</pre></div> </div></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
</html>
|
@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:59 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:35 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
@ -123,13 +123,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<li>disableTimer1()
|
||||
: <a class="el" href="classDMD.html#a39af27e216f654ecc7e60b0614cb6b33">DMD</a>
|
||||
</li>
|
||||
<li>disableTimer2()
|
||||
: <a class="el" href="classDMD.html#a52fe885bfb380b74df54c96221811cff">DMD</a>
|
||||
</li>
|
||||
<li>dispatch()
|
||||
: <a class="el" href="classBoolField.html#af793bafc1193d79b495c2ede711bca57">BoolField</a>
|
||||
: <a class="el" href="classTimeField.html#a9b953d9abdbe960a3fa34938462832e5">TimeField</a>
|
||||
, <a class="el" href="classBoolField.html#af793bafc1193d79b495c2ede711bca57">BoolField</a>
|
||||
, <a class="el" href="classField.html#a061bd1ed4d8b079df86465df8facd3b3">Field</a>
|
||||
, <a class="el" href="classForm.html#a89bd3850e87caa2ca7b2e946f923d0ee">Form</a>
|
||||
, <a class="el" href="classIntField.html#a01a17d5a89c76c42c4f0516984ce653f">IntField</a>
|
||||
, <a class="el" href="classListField.html#a5d752bd561cde735b175bcdfda55832a">ListField</a>
|
||||
, <a class="el" href="classTimeField.html#a9b953d9abdbe960a3fa34938462832e5">TimeField</a>
|
||||
</li>
|
||||
<li>display()
|
||||
: <a class="el" href="classLCD.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">LCD</a>
|
||||
@ -159,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
: <a class="el" href="classBitmap.html#a568acbca3818dd85dd62fff6d0b36ffb">Bitmap</a>
|
||||
</li>
|
||||
<li>drawInvertedBitmap()
|
||||
: <a class="el" href="classBitmap.html#a4321640464bc08b60348c09bff01b86a">Bitmap</a>
|
||||
: <a class="el" href="classBitmap.html#ae41aa6bfa8d508d216e25d80bb93747e">Bitmap</a>
|
||||
</li>
|
||||
<li>drawLine()
|
||||
: <a class="el" href="classBitmap.html#aa0a84f3694e343d68e7021552c69f767">Bitmap</a>
|
||||
@ -192,7 +195,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Tue May 29 2012 15:23:58 for ArduinoLibs by 
|
||||
<hr class="footer"/><address class="footer"><small>Generated on Wed May 30 2012 15:44:34 for ArduinoLibs by 
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
||||
</body>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user