LOGGER
Logger
Data Logging using ESP8266
Main Page
Classes
Files
File List
File Members
basetype.h
1
//
4
// Copyright (c) 2014-2016 by Dragonnorth Group, all rights reserved.
5
//
6
// Author: Michael Newman
7
#ifndef basetypeHedit
8
#define basetypeHedit 3
9
// 14Feb16 MJNewman 3: Huzzah platform updates.
10
// 28Dec15 MJNewman 2: Add Arduino support and clean up for just
11
// the Arduino environment.
12
// 9Jun14 MJNewman 1: Created based on earlier licensed code.
13
//
14
// An unrestricted license to this software is granted to:
15
// Airborne Sensor, Inc.
16
// and may be granted to others.
17
18
/* By default BASETYPE includes some standard system libraries. Set this
19
** flag to 0 to prevent this.
20
*/
21
#include <inttypes.h>
22
#ifndef __BASETYPE_INCLUDE_SYS
23
#define __BASETYPE_INCLUDE_SYS 1
24
#endif
25
26
#if (__BASETYPE_INCLUDE_SYS)
27
#include <sys/types.h>
28
#include <stdio.h>
29
#include <string.h>
30
#include <stdlib.h>
31
#include <ctype.h>
32
#endif
33
34
#include <WString.h>
// for String
35
36
#ifndef AOSVS
37
#define AOSVS 0
38
#endif
39
40
#ifndef UNIX
41
#define UNIX 0
42
#endif
43
45
#ifdef __MSDOS__
46
#ifndef MSDOS
47
#define MSDOS 1
48
#endif
49
#else
50
#ifndef MSDOS
51
#define MSDOS 0
52
#endif
53
#endif
54
56
#ifdef __TURBOC__
57
#ifndef ANSI_C
58
#define ANSI_C 1
59
#endif
60
#endif
61
63
#if AOSVS
64
#ifndef ANSI_C
65
#define ANSI_C 0
66
#endif
67
#endif
68
70
#ifdef _MSC_VER
71
#ifndef ANSI_C
72
#define ANSI_C 1
73
#endif
74
#endif
75
77
#ifndef ANSI_C
78
#ifdef __STDC__
79
#define ANSI_C 1
80
#else
81
#define ANSI_C 0
82
#endif
83
#endif
84
86
#if ANSI_C
87
#include <stdarg.h>
88
#else
89
#ifndef const
90
#define const
91
#endif
92
#endif
93
95
#ifdef __TURBOC__
96
#undef EXPORT
97
#ifdef __STDC__
98
#define EXPORT
99
#else
100
#define EXPORT _export far pascal
101
#endif
102
#else
103
#ifndef _MSC_VER
104
#define EXPORT
105
#endif
106
#endif
107
108
115
#ifdef __WATCOMC__
116
#define COMPILE_TIME_CHECKS_SUPPORTED 0
117
#endif
118
120
#ifdef _MSC_VER
121
#define COMPILE_TIME_CHECKS_SUPPORTED 0
122
#endif
123
125
#ifdef __TURBOC__
126
#define COMPILE_TIME_CHECKS_SUPPORTED 1
127
#endif
128
130
#ifndef COMPILE_TIME_CHECKS_SUPPORTED
131
#define COMPILE_TIME_CHECKS_SUPPORTED 1
132
#endif
133
140
#define EXTERNDEF
141
#define EXTERNREF extern
142
#define EXTERNVAR
143
#define EXTERNVREF extern
144
#define EXTERNC extern "C"
145
#define LOCALDEF static
146
#define LOCALREF static
147
#define LOCALVAR static
148
#define LOCALVREF static
149
150
#ifdef NS486SXF
152
#ifdef far
153
#undef far
154
#endif
155
#define far
/* */
156
158
#ifdef near
159
#undef near
160
#endif
161
#define near
/* */
162
#endif
163
165
typedef
void
VOIDfVOID(
void
);
166
typedef
VOIDfVOID *pVOIDfVOID;
167
169
typedef
void
VOIDfCHAR(
char
);
170
typedef
VOIDfCHAR *pVOIDfCHAR;
171
173
typedef
void
VOIDfSTRING(
char
*);
174
typedef
VOIDfSTRING *pVOIDfSTRING;
175
177
typedef
void
VOIDfConstSTRING(
const
char
*);
178
typedef
VOIDfConstSTRING *pVOIDfConstSTRING;
179
181
typedef
bool
BOOLfINT(
int
);
182
typedef
BOOLfINT *pBOOLfINT;
183
185
typedef
char
CHARfCHAR(
char
);
186
typedef
CHARfCHAR *pCHARfCHAR;
187
189
typedef
void
VOIDfINT(
int
);
190
typedef
VOIDfINT *pVOIDfINT;
191
193
typedef
void
VOIDf2INT(
int
,
int
);
194
typedef
VOIDf2INT *pVOIDf2INT;
195
197
#ifndef DIM
198
#define DIM(_x) ((sizeof(_x)/sizeof(_x[0])))
199
#endif
200
202
#ifndef MAX
203
#define MAX(_a,_b) ((_a > _b) ? _a : _b)
204
#endif
205
207
#ifndef MIN
208
#define MIN(_a,_b) ((_a < _b) ? _a : _b)
209
#endif
210
212
#define STRING_LENGTH 200
213
215
#ifndef NUL
216
#define NUL ((char)'\0')
217
#endif
218
#define BACKSPACE 0x08
219
#define CR 13
220
#define LF 10
221
#ifndef ESC
222
#define ESC 27
223
#endif
224
#define UPARROW 72
225
#define LEFTARROW 75
226
#define DOWNARROW 80
227
#define OPEN_PAREN '('
228
#define CLOSE_PAREN ')'
229
#define OPEN_SQUARE_BRACE '['
230
#define CLOSE_SQUARE_BRACE ']'
231
#define SINGLE_QUOTE 0x27
232
233
typedef
enum
{
235
FormatForConsole,
236
FormatForWeb,
237
FormatForXML,
238
} FormatType_t;
239
240
#endif // defined(basetypeHedit)
Generated by
1.8.10