Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UsbHostMAX3421E_Hello
version_helper.h
00001 /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved. 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 00017 Contact information 00018 ------------------- 00019 00020 Circuits At Home, LTD 00021 Web : http://www.circuitsathome.com 00022 e-mail : support@circuitsathome.com 00023 */ 00024 00025 /* 00026 * Universal Arduino(tm) "IDE" fixups. 00027 * Includes fixes for versions as low as 0023, used by Digilent. 00028 */ 00029 00030 #ifndef __PGMSPACE_H_ 00031 #define __PGMSPACE_H_ 1 00032 00033 #include <inttypes.h> 00034 00035 #ifndef PROGMEM 00036 #define PROGMEM 00037 #endif 00038 #ifndef PGM_P 00039 #define PGM_P const char * 00040 #endif 00041 #ifndef PSTR 00042 #define PSTR(str) (str) 00043 #endif 00044 #ifndef __MBED__ 00045 #ifndef F 00046 #define F(str) (str) 00047 #endif 00048 #endif 00049 #ifndef _SFR_BYTE 00050 #define _SFR_BYTE(n) (n) 00051 #endif 00052 00053 #ifndef memchr_P 00054 #define memchr_P(str, c, len) memchr((str), (c), (len)) 00055 #endif 00056 #ifndef memcmp_P 00057 #define memcmp_P(a, b, n) memcmp((a), (b), (n)) 00058 #endif 00059 #ifndef memcpy_P 00060 #define memcpy_P(dest, src, num) memcpy((dest), (src), (num)) 00061 #endif 00062 #ifndef memmem_P 00063 #define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen)) 00064 #endif 00065 #ifndef memrchr_P 00066 #define memrchr_P(str, val, len) memrchr((str), (val), (len)) 00067 #endif 00068 #ifndef strcat_P 00069 #define strcat_P(dest, src) strcat((dest), (src)) 00070 #endif 00071 #ifndef strchr_P 00072 #define strchr_P(str, c) strchr((str), (c)) 00073 #endif 00074 #ifndef strchrnul_P 00075 #define strchrnul_P(str, c) strchrnul((str), (c)) 00076 #endif 00077 #ifndef strcmp_P 00078 #define strcmp_P(a, b) strcmp((a), (b)) 00079 #endif 00080 #ifndef strcpy_P 00081 #define strcpy_P(dest, src) strcpy((dest), (src)) 00082 #endif 00083 #ifndef strcasecmp_P 00084 #define strcasecmp_P(a, b) strcasecmp((a), (b)) 00085 #endif 00086 #ifndef strcasestr_P 00087 #define strcasestr_P(a, b) strcasestr((a), (b)) 00088 #endif 00089 #ifndef strlcat_P 00090 #define strlcat_P(dest, src, len) strlcat((dest), (src), (len)) 00091 #endif 00092 #ifndef strlcpy_P 00093 #define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len)) 00094 #endif 00095 #ifndef strlen_P 00096 #define strlen_P(s) strlen((const char *)(s)) 00097 #endif 00098 #ifndef strnlen_P 00099 #define strnlen_P(str, len) strnlen((str), (len)) 00100 #endif 00101 #ifndef strncmp_P 00102 #define strncmp_P(a, b, n) strncmp((a), (b), (n)) 00103 #endif 00104 #ifndef strncasecmp_P 00105 #define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n)) 00106 #endif 00107 #ifndef strncat_P 00108 #define strncat_P(a, b, n) strncat((a), (b), (n)) 00109 #endif 00110 #ifndef strncpy_P 00111 #define strncpy_P(a, b, n) strncpy((a), (b), (n)) 00112 #endif 00113 #ifndef strpbrk_P 00114 #define strpbrk_P(str, chrs) strpbrk((str), (chrs)) 00115 #endif 00116 #ifndef strrchr_P 00117 #define strrchr_P(str, c) strrchr((str), (c)) 00118 #endif 00119 #ifndef strsep_P 00120 #define strsep_P(strp, delim) strsep((strp), (delim)) 00121 #endif 00122 #ifndef strspn_P 00123 #define strspn_P(str, chrs) strspn((str), (chrs)) 00124 #endif 00125 #ifndef strstr_P 00126 #define strstr_P(a, b) strstr((a), (b)) 00127 #endif 00128 #ifndef sprintf_P 00129 #define sprintf_P(s, ...) sprintf((s), __VA_ARGS__) 00130 #endif 00131 #ifndef vfprintf_P 00132 #define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__) 00133 #endif 00134 #ifndef printf_P 00135 #define printf_P(...) printf(__VA_ARGS__) 00136 #endif 00137 #ifndef snprintf_P 00138 #define snprintf_P(s, n, ...) ((s), (n), __VA_ARGS__) 00139 #endif 00140 #ifndef vsprintf_P 00141 #define vsprintf_P(s, ...) ((s),__VA_ARGS__) 00142 #endif 00143 #ifndef vsnprintf_P 00144 #define vsnprintf_P(s, n, ...) ((s), (n),__VA_ARGS__) 00145 #endif 00146 #ifndef fprintf_P 00147 #define fprintf_P(s, ...) ((s), __VA_ARGS__) 00148 #endif 00149 00150 #ifndef pgm_read_byte 00151 #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) 00152 #endif 00153 #ifndef pgm_read_word 00154 #define pgm_read_word(addr) (*(const unsigned short *)(addr)) 00155 #endif 00156 #ifndef pgm_read_dword 00157 #define pgm_read_dword(addr) (*(const unsigned long *)(addr)) 00158 #endif 00159 #ifndef pgm_read_float 00160 #define pgm_read_float(addr) (*(const float *)(addr)) 00161 #endif 00162 00163 #ifndef pgm_read_byte_near 00164 #define pgm_read_byte_near(addr) pgm_read_byte(addr) 00165 #endif 00166 #ifndef pgm_read_word_near 00167 #define pgm_read_word_near(addr) pgm_read_word(addr) 00168 #endif 00169 #ifndef pgm_read_dword_near 00170 #define pgm_read_dword_near(addr) pgm_read_dword(addr) 00171 #endif 00172 #ifndef pgm_read_float_near 00173 #define pgm_read_float_near(addr) pgm_read_float(addr) 00174 #endif 00175 #ifndef pgm_read_byte_far 00176 #define pgm_read_byte_far(addr) pgm_read_byte(addr) 00177 #endif 00178 #ifndef pgm_read_word_far 00179 #define pgm_read_word_far(addr) pgm_read_word(addr) 00180 #endif 00181 #ifndef pgm_read_dword_far 00182 #define pgm_read_dword_far(addr) pgm_read_dword(addr) 00183 #endif 00184 #ifndef pgm_read_float_far 00185 #define pgm_read_float_far(addr) pgm_read_float(addr) 00186 #endif 00187 00188 #ifndef pgm_read_pointer 00189 #define pgm_read_pointer 00190 #endif 00191 #endif
Generated on Tue Jul 12 2022 18:12:05 by
1.7.2