[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?
From: |
Bill Somerville |
Subject: |
[avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's? |
Date: |
Thu, 30 Sep 2004 12:35:22 +0100 |
Is there any reason why the LPM macros in avr/pgmspace.h cannot be
reimplemented as inline functions?
E.g.:
__inline__
uint8_t
__LPM_classic__( uint16_t addr )
{
uint8_t result;
__asm__
(
"lpm" "\n\t"
"mov %0, r0" "\n\t"
: "=r" (result)
: "z" (addr)
: "r0"
);
return result;
}
This avoids warnings in C with -pedantic compiler switch, makes the code
leagal in C++ (it is an error with -pedantic switch in C++).
Bill Somerville
- [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?,
Bill Somerville <=
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, Theodore A. Roth, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, E. Weddington, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, Geoffrey Wossum, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, Theodore A. Roth, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, E. Weddington, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, Theodore A. Roth, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inline fn's?, E. Weddington, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inlinefn's?, Bill Somerville, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inlinefn's?, E. Weddington, 2004/09/30
- Re: [avr-libc-dev] Can pgmspace.h __LPM_xxx__ macros become inlinefn's?, Bill Somerville, 2004/09/30