avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] macros.inc and sfr_defs.h


From: Olaf Zenker
Subject: [avr-gcc-list] macros.inc and sfr_defs.h
Date: Fri, 24 Jan 2003 18:16:51 +0100

what do you think about an expansion ot macros.inc with the following 
macros?

/* for use with the new IO definitions of sfr_defs.h */ 
/* The register number for the registerargument */
.macro x_out addr reg
        .if _SFR_IO_REG_P(\addr)
                out     _SFR_IO_ADDR(\addr), (\reg)
        .else
                sts     _SFR_MEM_ADDR(\addr), (\reg)
        .endif
.endm   

.macro x_in reg addr
        .if _SFR_IO_REG_P(\addr)
                in      (\reg), _SFR_IO_ADDR(\addr)
        .else
                lds     (\reg), _SFR_MEM_ADDR(\addr)
        .endif
.endm   

Should help to migrate smoother to the new definition of all IOs.

Regards
Olaf


HKR Sensorsysteme GmbH
Frauenstr. 22 - 80469 M√ľnchen
Tel.: +49 89 242416-0
Fax:  +49 89 242416-55 

mail: address@hidden
http://www.hkr-sensor.de

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]