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

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

[avr-libc-dev] pgmspace.h compatibility with -mint8


From: Tomas Vanek
Subject: [avr-libc-dev] pgmspace.h compatibility with -mint8
Date: Tue, 16 Sep 2003 06:35:07 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910

Hi,
There is a small patch to make pgm_read_*() work with -mint8 switch.
Patch was made for snapshot 20030815, however is needed for last version 20030908.

BTW: Library does very good job in my MCUs. Thanks.

Bye
        Tom

diff -ur avr-libc-0.99.90.20030815/include/avr/pgmspace.h 
/c/WinAVR/avr/include/avr/pgmspace.h
--- avr-libc-0.99.90.20030815/include/avr/pgmspace.h    2003-08-15 
20:25:52.000000000 +0200
+++ /c/WinAVR/avr/include/avr/pgmspace.h        2003-09-14 09:34:27.000000000 
+0200
@@ -174,7 +174,7 @@
     \note The address is a byte address.
     The address is in the program space. */
 
-#define pgm_read_byte_near(address_short)   __LPM((unsigned 
short)(address_short))
+#define pgm_read_byte_near(address_short)   __LPM((uint16_t)(address_short))
 
 /** \ingroup avr_pgmspace
     \def pgm_read_word_near(address_short)
@@ -182,7 +182,7 @@
     \note The address is a byte address. 
     The address is in the program space. */
 
-#define pgm_read_word_near(address_short)   __LPM_word((unsigned 
short)(address_short))
+#define pgm_read_word_near(address_short)   
__LPM_word((uint16_t)(address_short))
 
 #ifdef RAMPZ  /* >64K program memory (ATmega103, ATmega128) */
 


reply via email to

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