00001 /* 00002 * Copyright (C) 2001-2007 by egnite Software GmbH. All rights reserved. 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the copyright holders nor the names of 00014 * contributors may be used to endorse or promote products derived 00015 * from this software without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS 00018 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00019 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00020 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE 00021 * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00022 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00023 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00024 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00025 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00026 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00027 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00028 * SUCH DAMAGE. 00029 * 00030 * For additional information see http://www.ethernut.de/ 00031 * 00032 */ 00033 00034 /* 00035 * $Log$ 00036 * Revision 1.67 2009/03/09 08:28:03 haraldkipp 00037 * Beta 4.9 00038 * 00039 * Revision 1.66 2009/03/09 08:22:36 haraldkipp 00040 * Release branch 4.8 created 00041 * 00042 * Revision 1.65 2009/03/09 08:15:14 haraldkipp 00043 * Release branch 4.8 announced 00044 * 00045 * Revision 1.64 2009/01/09 17:54:14 haraldkipp 00046 * Next beta will be 4.7.5. 00047 * 00048 * Revision 1.63 2008/10/10 11:52:25 haraldkipp 00049 * Lua added. 00050 * 00051 * Revision 1.62 2008/08/29 15:03:04 haraldkipp 00052 * Fixed Configurator bug #2082123. Options now correctly enabled. 00053 * 00054 * Revision 1.61 2008/08/28 16:11:31 haraldkipp 00055 * Fixed bitbanging SPI for ARM targets. 00056 * 00057 * Revision 1.60 2008/08/25 17:05:27 haraldkipp 00058 * Beta release 4.7.1. 00059 * 00060 * Revision 1.59 2008/08/11 07:00:34 haraldkipp 00061 * BSD types replaced by stdint types (feature request #1282721). 00062 * 00063 * Revision 1.58 2008/07/29 13:06:21 haraldkipp 00064 * Starting beta 4.7 00065 * 00066 * Revision 1.57 2008/07/29 13:04:18 haraldkipp 00067 * Release branch 4.6 created 00068 * 00069 * Revision 1.56 2008/07/29 12:13:38 haraldkipp 00070 * Release branch 4.6 announced 00071 * 00072 * Revision 1.55 2008/07/26 09:39:16 haraldkipp 00073 * Preparing 4.5.7 beta. 00074 * 00075 * Revision 1.54 2008/07/24 17:06:07 haraldkipp 00076 * Preparing 4.5.6 beta. 00077 * 00078 * Revision 1.53 2008/07/14 13:14:38 haraldkipp 00079 * Second build of version 4.5.5. 00080 * 00081 * Revision 1.52 2008/07/10 12:17:41 haraldkipp 00082 * Preparing beta version 4.5.5. 00083 * 00084 * Revision 1.51 2008/04/18 13:12:31 haraldkipp 00085 * ICCAVR fixes, many shorts to int, PPP+RS485 for AT91. 00086 * 00087 * Revision 1.50 2008/04/02 09:39:28 haraldkipp 00088 * Fixed another PHAT file pointer bug. 00089 * 00090 * Revision 1.49 2008/04/01 10:09:55 haraldkipp 00091 * Beta version 4.5.2. 00092 * 00093 * Revision 1.48 2008/02/15 16:50:33 haraldkipp 00094 * Beta release 4.5.1. 00095 * 00096 * Revision 1.47 2007/09/11 15:40:45 haraldkipp 00097 * Release branch 4.4 created 00098 * 00099 * Revision 1.46 2007/08/30 12:15:06 haraldkipp 00100 * Configurable MMC timings. 00101 * 00102 * Revision 1.45 2007/08/29 13:35:19 haraldkipp 00103 * Announcing release branch 4.4. 00104 * 00105 * Revision 1.44 2007/05/24 07:30:48 haraldkipp 00106 * Bugfixes for preparing release candidate. 00107 * 00108 * Revision 1.43 2007/05/02 11:35:25 haraldkipp 00109 * ATmega2561 and other fixes. 00110 * IGMP support started, but not finished. 00111 * Socket ioctl started, but not finished. 00112 * 00113 * Revision 1.42 2007/04/12 08:54:39 haraldkipp 00114 * Supports configurable SPI, VS10XX MP3 decoder chips and Mega256 for 00115 * avr-gcc 4.1.1. 00116 * 00117 * Revision 1.41 2007/02/15 15:59:12 haraldkipp 00118 * First 4.3 Beta Release 00119 * 00120 * Revision 1.40 2006/10/17 11:26:02 haraldkipp 00121 * Release branch 4.2 created. 00122 * 00123 * Revision 1.39 2006/10/05 17:26:58 haraldkipp 00124 * Follows unofficial rc10. 00125 * 00126 * Revision 1.38 2006/09/29 12:19:34 haraldkipp 00127 * RC10 00128 * 00129 * Revision 1.37 2006/08/31 19:19:55 haraldkipp 00130 * No time to write comments. ;-) 00131 * 00132 * Revision 1.36 2006/08/01 07:33:02 haraldkipp 00133 * Preparing new release candidate. 00134 * 00135 * Revision 1.35 2006/07/26 11:14:52 haraldkipp 00136 * Release candidate 6 00137 * 00138 * Revision 1.34 2006/07/10 14:29:03 haraldkipp 00139 * Release candidate 4.1.9.4. 00140 * C++ support added. These patches had been kindly contributed by 00141 * Matthias Wilde. 00142 * 00143 * Revision 1.33 2006/07/05 08:03:54 haraldkipp 00144 * Second trial to move to 4.2. 00145 * 00146 * Revision 1.32 2006/06/28 14:43:06 haraldkipp 00147 * Release candidate prepared. 00148 * 00149 * Revision 1.31 2006/05/15 12:48:49 haraldkipp 00150 * Prepare pre-release 4.1.6. 00151 * 00152 * Revision 1.30 2006/04/07 13:59:55 haraldkipp 00153 * Pre-release 4.1.5.4. 00154 * 00155 * Revision 1.29 2006/02/08 15:20:56 haraldkipp 00156 * ATmega2561 Support 00157 * 00158 * Revision 1.28 2006/01/23 19:53:33 haraldkipp 00159 * Minor fixes 00160 * 00161 * Revision 1.27 2006/01/23 17:37:08 haraldkipp 00162 * Mostly memory alignment fixes. 00163 * 00164 * Revision 1.26 2006/01/22 17:46:18 haraldkipp 00165 * Pre-release 4.1.3 00166 * 00167 * Revision 1.25 2006/01/19 18:39:33 haraldkipp 00168 * Pre-release 4.1.2. 00169 * 00170 * Revision 1.24 2006/01/08 11:55:52 haraldkipp 00171 * Prepare preview snapshot. 00172 * 00173 * Revision 1.23 2005/12/04 18:42:21 haraldkipp 00174 * Release branch X.Y created. 00175 * 00176 * Revision 1.22 2005/12/02 11:36:12 haraldkipp 00177 * Release 4.0 scheduled 00178 * 00179 * Revision 1.21 2005/11/20 14:36:07 haraldkipp 00180 * Preparing last version 4 preview. 00181 * 00182 * Revision 1.20 2005/08/02 17:47:04 haraldkipp 00183 * Major API documentation update. 00184 * 00185 * Revision 1.19 2005/07/20 09:14:40 haraldkipp 00186 * Release 3.9.8 00187 * 00188 * Revision 1.18 2005/06/06 10:40:31 haraldkipp 00189 * Emergency bugfix release 3.9.7.1. 00190 * 00191 * Revision 1.17 2005/05/25 10:04:58 haraldkipp 00192 * Win 32 release. 00193 * 00194 * Revision 1.16 2005/05/24 16:12:51 haraldkipp 00195 * Sigh! 00196 * 00197 * Revision 1.15 2005/05/22 16:05:40 haraldkipp 00198 * *** empty log message *** 00199 * 00200 * Revision 1.14 2005/04/05 17:37:12 haraldkipp 00201 * First Nut/OS running ARM responds to http requests 00202 * 00203 * Revision 1.13 2005/02/07 15:24:46 haraldkipp 00204 * ARP cache bugfix. 00205 * 00206 * Revision 1.12 2005/02/06 16:35:33 haraldkipp 00207 * *** empty log message *** 00208 * 00209 * Revision 1.11 2005/01/02 10:07:10 haraldkipp 00210 * Replaced platform dependant formats in debug outputs. 00211 * 00212 * Revision 1.10 2004/10/03 18:44:40 haraldkipp 00213 * A little bit of Game Boy 00214 * 00215 * Revision 1.9 2004/09/08 09:55:19 haraldkipp 00216 * Although this is no final release, there is a lot of new hardware waiting 00217 * for Nut/OS support. So I marked this with version 3.9.1 before creating 00218 * the long awaited 4.0 branch. 00219 * 00220 * Revision 1.8 2004/01/30 11:50:26 haraldkipp 00221 * Release branch 3.4 created 00222 * 00223 * Revision 1.7 2004/01/27 13:41:52 haraldkipp 00224 * Branch 3.4 announced 00225 * 00226 * Revision 1.6 2003/12/15 19:32:32 haraldkipp 00227 * Preview 00228 * 00229 * Revision 1.5 2003/11/04 17:59:04 haraldkipp 00230 * Corrected 00231 * 00232 * Revision 1.4 2003/11/03 16:28:20 haraldkipp 00233 * Release version 3.3.2 00234 * 00235 * Revision 1.3 2003/08/14 15:22:24 haraldkipp 00236 * New release 00237 * 00238 * Revision 1.2 2003/07/21 18:26:31 haraldkipp 00239 * Version 3.3 00240 * 00241 * Revision 1.1.1.1 2003/05/09 14:41:55 haraldkipp 00242 * Initial using 3.2.1 00243 * 00244 * Revision 1.3 2003/05/06 18:58:16 harald 00245 * Prepare final release 00246 * 00247 * Revision 1.2 2003/03/31 14:40:57 harald 00248 * *** empty log message *** 00249 * 00250 * Revision 1.1 2003/02/04 18:17:07 harald 00251 * Version 3 released 00252 * 00253 */ 00254 00255 #include <sys/version.h> 00256 00257 #if defined(__GNUC__) 00258 #define NUM2STR(x) #x 00259 #define OS_VERSION_STRING(a, b, c, d) NUM2STR(a) "." NUM2STR(b) "." NUM2STR(c) "." NUM2STR(d) 00260 static CONST char *os_version_string = 00261 OS_VERSION_STRING(NUT_VERSION_MAJOR, NUT_VERSION_MINOR, NUT_VERSION_RELEASE, NUT_VERSION_BUILD); 00262 #else 00263 static CONST char os_version_string[] = { 00264 #if NUT_VERSION_MAJOR >= 10 00265 (NUT_VERSION_MAJOR / 10) + '0', 00266 #endif 00267 (NUT_VERSION_MAJOR % 10) + '0', '.', 00268 #if NUT_VERSION_MINOR >= 10 00269 (NUT_VERSION_MINOR / 10) + '0', 00270 #endif 00271 (NUT_VERSION_MINOR % 10) + '0', '.', 00272 #if NUT_VERSION_RELEASE >= 10 00273 (NUT_VERSION_RELEASE / 10) + '0', 00274 #endif 00275 (NUT_VERSION_RELEASE % 10) + '0', '.', 00276 #if NUT_VERSION_BUILD >= 10 00277 (NUT_VERSION_BUILD / 10) + '0', 00278 #endif 00279 (NUT_VERSION_BUILD % 10) + '0', 0 00280 }; 00281 #endif 00282 00287 00288 00297 uint32_t NutVersion(void) 00298 { 00299 return OS_VERSION_NUMBER; 00300 } 00301 00313 CONST char *NutVersionString(void) 00314 { 00315 return os_version_string; 00316 } 00317