<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>avr-libc: <avr/signature.h>: Signature Support</title> <link href="dox.css" rel="stylesheet" type="text/css"> </head> <body> <center> <table width="80%"> <tr> <td align="left"><a href="http://www.nongnu.org/avr-libc/">AVR Libc Home Page</a></td> <td align="center" colspan=4><img src="avrs.png" alt="AVRs" align="middle" border="0"></td> <td align="right"><a href="https://savannah.nongnu.org/projects/avr-libc/">AVR Libc Development Pages</a></td> </tr> <tr> <td align="center" width="13%"><a href="index.html">Main Page</a></td> <td align="center" width="13%"><a href="pages.html">User Manual</a></td> <td align="center" width="13%"><a href="modules.html">Library Reference</a></td> <td align="center" width="13%"><a href="FAQ.html">FAQ</a></td> <td align="center" width="13%"><a href="globals.html">Alphabetical Index</a></td> <td align="center" width="13%"><a href="group__demos.html">Example Projects</a></td> </tr> </table> </center> <hr width="80%"> <!-- Generated by Doxygen 1.6.1 --> <div class="contents"> <h1><avr/signature.h>: Signature Support</h1><table border="0" cellpadding="0" cellspacing="0"> </table> <dl class="user"><dt><b>Introduction</b></dt><dd></dd></dl> <p>The <<a class="el" href="signature_8h.html">avr/signature.h</a>> header file allows the user to automatically and easily include the device's signature data in a special section of the final linked ELF file.</p> <p>This value can then be used by programming software to compare the on-device signature with the signature recorded in the ELF file to look for a match before programming the device.</p> <dl class="user"><dt><b>API Usage Example</b></dt><dd></dd></dl> <p>Usage is very simple; just include the header file:</p> <div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="signature_8h.html">avr/signature.h</a>></span> </pre></div><p>This will declare a constant unsigned char array and it is initialized with the three signature bytes, MSB first, that are defined in the device I/O header file. This array is then placed in the .signature section in the resulting linked ELF file.</p> <p>The three signature bytes that are used to initialize the array are these defined macros in the device I/O header file, from MSB to LSB: SIGNATURE_2, SIGNATURE_1, SIGNATURE_0.</p> <p>This header file should only be included once in an application. </p> </div> <hr width="80%"> <p><center>Automatically generated by Doxygen 1.6.1 on 30 Nov 2009.</center></p> </body> </html>