$treeview $search $mathjax $extrastylesheet
avr-libc  2.0.0
$projectbrief
$projectbrief
$searchbox

AVR Libc Home Page

AVRs

AVR Libc Development Pages

Main Page

User Manual

Library Reference

FAQ

Example Projects

project.h

00001 /*
00002  * ----------------------------------------------------------------------------
00003  * "THE BEER-WARE LICENSE" (Revision 42):
00004  * Joerg Wunsch wrote this file.  As long as you retain this notice you
00005  * can do whatever you want with this stuff. If we meet some day, and you think
00006  * this stuff is worth it, you can buy me a beer in return.        Joerg Wunsch
00007  * ----------------------------------------------------------------------------
00008  *
00009  * Demo combining C and assembly source files.
00010  *
00011  * $Id$
00012  */
00013 
00014 /*
00015  * Global register variables.
00016  */
00017 #ifdef __ASSEMBLER__
00018 
00019 #  define sreg_save r2
00020 #  define flags     r16
00021 #  define counter_hi    r4
00022 
00023 #else  /* !ASSEMBLER */
00024 
00025 #include <stdint.h>
00026 
00027 register uint8_t sreg_save asm("r2");
00028 register uint8_t flags     asm("r16");
00029 register uint8_t counter_hi asm("r4");
00030 
00031 #endif /* ASSEMBLER */
 All Data Structures Files Functions Variables Typedefs Enumerations Defines