Lamp-Da
0.1
A compact lantern project
Loading...
Searching...
No Matches
src
compile.h
Go to the documentation of this file.
1
5
#ifndef COMPILE_H
6
#define COMPILE_H
7
8
// define hardware constants
9
#if HARDWARE_VERSION_MAJOR == 1 && HARDWARE_VERSION_MINOR == 0
10
#warning "hardware version set to 1.0"
11
#endif
12
13
//
14
// optional defines
15
//
16
17
// #define DEBUG_MODE
18
#define USE_BLUETOOTH
19
20
//
21
// lamp type detection
22
//
23
24
// LMBD_LAMP_TYPE__SIMPLE
25
#ifdef LMBD_LAMP_TYPE__SIMPLE
26
27
#warning Compiling SIMPLE lamp type
28
29
#ifdef LMBD_LAMP_TYPE__CCT
30
#error "Cannot define CCT if SIMPLE is defined"
31
#endif
32
33
#ifdef LMBD_LAMP_TYPE__INDEXABLE
34
#error "Cannot define INDEXABLE if SIMPLE is defined"
35
#endif
36
37
#endif
// LMBD_LAMP_TYPE__SIMPLE
38
39
// LMBD_LAMP_TYPE__CCT
40
#ifdef LMBD_LAMP_TYPE__CCT
41
42
#warning Compiling CCT lamp type
43
44
#ifdef LMBD_LAMP_TYPE__SIMPLE
45
#error "Cannot define SIMPLE if CCT is defined"
46
#endif
47
48
#ifdef LMBD_LAMP_TYPE__INDEXABLE
49
#error "Cannot define INDEXABLE if CCT is defined"
50
#endif
51
52
#endif
// LMBD_LAMP_TYPE__CCT
53
54
// LMBD_LAMP_TYPE__CCT
55
#ifdef LMBD_LAMP_TYPE__INDEXABLE
56
57
#warning Compiling INDEXABLE lamp type
58
59
#ifdef LMBD_LAMP_TYPE__SIMPLE
60
#error "Cannot define SIMPLE if INDEXABLE is defined"
61
#endif
62
63
#ifdef LMBD_LAMP_TYPE__CCT
64
#error "Cannot define CCT if INDEXABLE is defined"
65
#endif
66
67
#endif
// LMBD_LAMP_TYPE__CCT
68
69
#ifndef LMBD_LAMP_TYPE__SIMPLE
70
#ifndef LMBD_LAMP_TYPE__CCT
71
#ifndef LMBD_LAMP_TYPE__INDEXABLE
72
#error Must compile the program with a defined user mode
73
#endif
74
#endif
75
#endif
76
77
// Users triggering the error below, will either:
78
// - have no idea what they are doing, and shell prefer using the Makefile
79
// - be autonomous, and can add all the necessary build flags
80
// (among which -I$(BUILD_DIR)/objs/sketch and other -D<define>)
81
82
#ifndef LMBD_MISSING_DEFINE
83
#error "LMBD_MISSING_DEFINE missing, are you using the Makefile to build?"
84
#endif
85
86
#endif
Generated by
1.9.6