[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-commit] [2388] Submitted by Dean Camera:
From: |
Joerg Wunsch |
Subject: |
[avr-libc-commit] [2388] Submitted by Dean Camera: |
Date: |
Fri, 03 May 2013 15:36:58 +0000 |
Revision: 2388
http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2388
Author: joerg_wunsch
Date: 2013-05-03 15:36:57 +0000 (Fri, 03 May 2013)
Log Message:
-----------
Submitted by Dean Camera:
patch #7212: Add pgm_read_ptr() macros to pgmspace.h
* include/avr/pgmspace.h (pgm_read_ptr_near, pgm_read_ptr_far,
pgm_read_ptr): New macros.
Ticket Links:
------------
http://savannah.gnu.org/patch/?7212
Modified Paths:
--------------
trunk/avr-libc/ChangeLog
trunk/avr-libc/NEWS
trunk/avr-libc/include/avr/pgmspace.h
Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog 2013-05-03 15:19:25 UTC (rev 2387)
+++ trunk/avr-libc/ChangeLog 2013-05-03 15:36:57 UTC (rev 2388)
@@ -1,5 +1,12 @@
2013-05-03 Joerg Wunsch <address@hidden>
+ Submitted by Dean Camera:
+ patch #7212: Add pgm_read_ptr() macros to pgmspace.h
+ * include/avr/pgmspace.h (pgm_read_ptr_near, pgm_read_ptr_far,
+ pgm_read_ptr): New macros.
+
+2013-05-03 Joerg Wunsch <address@hidden>
+
Submitted by Radoslaw Koppel:
patch #7220: Add UBRR overload functionality to <util/setbaud.h>
* include/util/setbaud.h: check for overflow of UBRR_VALUE
Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2013-05-03 15:19:25 UTC (rev 2387)
+++ trunk/avr-libc/NEWS 2013-05-03 15:36:57 UTC (rev 2388)
@@ -20,6 +20,7 @@
* Contributed Patches:
[#3729] Printf for integers speed up
+ [#7212] Add pgm_read_ptr() macros to pgmspace.h
[#7220] Add UBRR overload functionality to <util/setbaud.h>
[#7260] Addition to power.h
[#7654] include/delay.h: delay_us >255us without decreasing resolution
Modified: trunk/avr-libc/include/avr/pgmspace.h
===================================================================
--- trunk/avr-libc/include/avr/pgmspace.h 2013-05-03 15:19:25 UTC (rev
2387)
+++ trunk/avr-libc/include/avr/pgmspace.h 2013-05-03 15:36:57 UTC (rev
2388)
@@ -590,6 +590,15 @@
#define pgm_read_float_near(address_short) \
__LPM_float((uint16_t)(address_short))
+/** \ingroup avr_pgmspace
+ \def pgm_read_ptr_near(address_short)
+ Read a pointer from the program space with a 16-bit (near) address.
+ \note The address is a byte address.
+ The address is in the program space. */
+
+#define pgm_read_ptr_near(address_short) \
+ (void*)__LPM_word((uint16_t)(address_short))
+
#if defined(RAMPZ) || defined(__DOXYGEN__)
/* Only for devices with more than 64K of program memory.
@@ -943,6 +952,15 @@
#define pgm_read_float_far(address_long) __ELPM_float((uint32_t)(address_long))
+/** \ingroup avr_pgmspace
+ \def pgm_read_ptr_far(address_long)
+ Read a pointer from the program space with a 32-bit (far) address.
+
+ \note The address is a byte address.
+ The address is in the program space. */
+
+#define pgm_read_ptr_far(address_long)
(void*)__ELPM_word((uint32_t)(address_long))
+
#endif /* RAMPZ or __DOXYGEN__ */
/** \ingroup avr_pgmspace
@@ -981,6 +999,15 @@
#define pgm_read_float(address_short) pgm_read_float_near(address_short)
+/** \ingroup avr_pgmspace
+ \def pgm_read_ptr(address_short)
+ Read a pointer from the program space with a 16-bit (near) address.
+
+ \note The address is a byte address.
+ The address is in the program space. */
+
+#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
+
/* pgm_get_far_address() macro
This macro facilitates the obtention of a 32 bit "far" pointer (only 24 bits
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-commit] [2388] Submitted by Dean Camera:,
Joerg Wunsch <=