AVR Libc Home Page AVRs AVR Libc Development Pages
Main Page User Manual Reference FAQ Example Projects

signature.h

Go to the documentation of this file.
01	1 Copyright (c) 2009, Atmel Corporation
	022All rights reserved.
	033
044Redistribution and use in source and binary forms, with or without 055modification, are permitted provided that the following conditions are met: 066 077* Redistributions of source code must retain the above copyright 088notice, this list of conditions and the following disclaimer. 099 1010* Redistributions in binary form must reproduce the above copyright 1111notice, this list of conditions and the following disclaimer in 1212the documentation and/or other materials provided with the 1313distribution. 1414 1515* Neither the name of the copyright holders nor the names of 1616contributors may be used to endorse or promote products derived 1717from this software without specific prior written permission. 1818 1919THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2020AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2121IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2222ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2323LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2424CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2525SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2626INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2727CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2828ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2929POSSIBILITY OF SUCH DAMAGE. */ 3030 3131/* $Id: signature.h 2296 2012-06-19 06:52:59Z joerg_wunsch $ */ 3232 3333/* avr/signature.h - Signature API */ 3434 3535#ifndef _AVR_SIGNATURE_H_ 3636#define _AVR_SIGNATURE_H_ 1 3737 3838/** \file */ 3939/** \defgroup avr_signature <avr/signature.h>: Signature Support 4040 4141\par Introduction 4242 4343The <avr/signature.h> header file allows the user to automatically 4444and easily include the device's signature data in a special section of 4545the final linked ELF file. 46464747This value can then be used by programming software to compare the on-device 4848signature with the signature recorded in the ELF file to look for a match 4949before programming the device. 50505151\par API Usage Example 5252 5353Usage is very simple; just include the header file: 54545555\code 5656#include <avr/signature.h> 5757\endcode 58585959This will declare a constant unsigned char array and it is initialized with 6060the three signature bytes, MSB first, that are defined in the device I/O 6161header file. This array is then placed in the .signature section in the 6262resulting linked ELF file. 63636464The three signature bytes that are used to initialize the array are 6565these defined macros in the device I/O header file, from MSB to LSB: 6666SIGNATURE_2, SIGNATURE_1, SIGNATURE_0. 67676868This header file should only be included once in an application. 6969*/ 7070 7171#ifndef __ASSEMBLER__ 7272 7373#include <avr/io.h> 7474 7575#if defined(SIGNATURE_0) && defined(SIGNATURE_1) && defined(SIGNATURE_2) 7676 7777const unsigned char __signature[3] 7878__attribute__((__used__, __section__(".signature"))) = 7979{ SIGNATURE_2, SIGNATURE_1, SIGNATURE_0 }; 8080 8181#endif /* defined(SIGNATURE_0) && defined(SIGNATURE_1) && defined(SIGNATURE_2) */ 8282 8383#endif /* __ASSEMBLER__ */ 8484 8585#endif /* _AVR_SIGNATURE_H_ */

io.h

__attribute__ static __inline void __attribute__((__always_inline__)) __power_all_enable()

Definition: power.h:1148