QP
0.7-SNAPSHOT
Control software for the ??SRT telescope
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Pages
types.h
1
#ifndef TYPES_H_LOADED
2
#define TYPES_H_LOADED 1
3
4
#include <limits.h>
5
6
// The PROVARINO macro is defined within Arduino.h when we are building this code
7
// for the unit test cases. It includes various C++ libraries (for
8
// example std::string and the std::cout objects) which are not
9
// available on the Arduino, but which we use when testing.
10
// the Arduino environment
11
#include <Arduino.h>
12
typedef
unsigned
long
ms_t;
13
#if PROVARINO
14
#define MS_FMT "%lu"
15
#else
16
#define MS_FMT "%l"
17
#endif
18
19
// Early versions of the Arduino toolchain apparently don't define UINT32_MAX.
20
// I'm not too happy second-guessing things here unless we need to run on old Dues,
21
// but we do in fact know that the Arduino unsigned long is 32 bits. So:
22
//#define UINT32_MAX 0xffffffff
23
24
// coded times: setting an action time to TIME_IMMEDIATELY means that
25
// it will be matched on the next time round the loop; setting it to
26
// TIME_NEVER means that it will never happen. The former may go
27
// slightly wrong when the millis() time wraps around, just before 50
28
// days after starting, but nothing bad happens then).
29
#define TIME_IMMEDIATELY (ms_t)0
30
#define TIME_NEVER (ms_t)UINT32_MAX
31
32
#if __cplusplus > 199711L
33
// this is a C++11 compiler
34
#define OVERRIDE override
35
#else
36
#define OVERRIDE
37
#endif
38
39
40
41
#endif
/* TYPES_H_LOADED */
Generated on Tue Jul 18 2017 17:57:39 for QP by
1.8.8