avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] missing pgm_read_ptr


From: Maurin Donneaud
Subject: Re: [avr-libc-dev] missing pgm_read_ptr
Date: Tue, 07 Jul 2015 10:28:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Oops sorry sorry,

it is not pgm_read_byte but pgm_read_ptr who is missing.

Best regards,

Maurin

Le 07/07/2015 08:44, Joerg Wunsch a écrit :
As Maurin Donneaud wrote:

I have linux avr-libc 1:1.8.0-4.1 installed
I'm wondering why pgmspace.h do not have the pgm_read_byte macro ?
$ fgrep pgm_read_byte ~/src/avr-libc/include/avr/pgmspace.h
     pgm_read_byte_near() or pgm_read_word_near() instead of
     pgm_read_byte_far() or pgm_read_word_far() since it is more efficient that
     \def pgm_read_byte_near(address_short)
#define pgm_read_byte_near(address_short) __LPM((uint16_t)(address_short))
     \def pgm_read_byte_far(address_long)
#define pgm_read_byte_far(address_long)  __ELPM((uint32_t)(address_long))
     \def pgm_read_byte(address_short)
#define pgm_read_byte(address_short)    pgm_read_byte_near(address_short)

So well, I think it's just there.



reply via email to

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