1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino-0018-windows/hardware/tools/avr/doc/avr-libc/examples/asmdemo/project.h
2010-03-30 21:53:44 +02:00

31 lines
875 B
C

/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Joerg Wunsch wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Joerg Wunsch
* ----------------------------------------------------------------------------
*
* Demo combining C and assembly source files.
*
* $Id: project.h,v 1.1 2006/08/29 19:45:06 joerg_wunsch Exp $
*/
/*
* Global register variables.
*/
#ifdef __ASSEMBLER__
# define sreg_save r2
# define flags r16
# define counter_hi r4
#else /* !ASSEMBLER */
#include <stdint.h>
register uint8_t sreg_save asm("r2");
register uint8_t flags asm("r16");
register uint8_t counter_hi asm("r4");
#endif /* ASSEMBLER */