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.

_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to