[En-Nut-Discussion] NutVersionString on AVR
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Oct 5 19:05:40 CEST 2009
Hello,
NutVersionString() returns a normal string, needing something like 8 bytes
in RAM space. On boards woth no external RAM, this is a noticable amount.
What about appended patch?
Bye
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: nut/os/version.c
===================================================================
--- nut/os/version.c (Revision 2740)
+++ nut/os/version.c (Arbeitskopie)
@@ -255,8 +255,12 @@
#include <sys/version.h>
#define OS_VERSION_NUMBER 0x04090700UL
-static CONST char os_version_string[] = "4.9.7.0";
-
+#ifdef PROGMEM
+static CONST char os_version_string[] PROGMEM
+#else
+static CONST char os_version_string[]
+#endif
+ = "4.9.7.0";
/*!
* \addtogroup xgNutVersion
*/
More information about the En-Nut-Discussion
mailing list