|
From: | Bernard Fouché |
Subject: | [avr-gcc-list] Someting I don"t understand with PGM_P et pgm_read_byte_far() |
Date: | Tue, 01 Mar 2005 16:44:35 +0100 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Hi there.I'm trying to compile for ATMEGA128. I sometimes need to use pgm_read_byte(). For instance with:
uint8_t f(PGM_P p) { return pgm_read_byte_far(p); } When doing so, the compiler says: "warning: cast from pointer to integer of different size".So it appears that, even for an ATMEGA128, a PGM_P data type is a 16 bits pointer. How can I tell the compiler that 'p' is a 32 bits address in flash in a proper way?
I'm using avr-libc-1.0.4 and avr-gcc 3.4.3. Thanks. Bernard
[Prev in Thread] | Current Thread | [Next in Thread] |