summaryrefslogtreecommitdiff
path: root/config.h
blob: ec589c3256733d5cbacffeeb3c0b1fc8d317134d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
 *  XIOH power sequence
 *  Copyright (C) 2013  Avencall
 *
 *  config.h - global software behavior configuration
 *  Authors:
 *    Guillaume Knispel
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef CONFIG_H
#define CONFIG_H

/* The timing values used in the main program depend on the period
 * of Timer_A. Use identity for a 1 ms [+0%; +n%] period.
 * (Use 2 * (x) for a 0.5 ms [+0%; +n%] period, and so over.)
 */
#define MS(x)		(x)

    ////////////////////////////////////////////////////////////////////

/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING:
 * production firmwares MUST be built with:
 *    define WATCHDOG
 *    undef TRACE_SERIAL
 *    undef TEST_LOOP_SPEED
 *    undef LOOP_REBOOT
 *
 * Please also commit in the main branch with those options.
 */

/* define WATCHDOG to get one :)
 * Note that undefining WATCHDOG disables *all* reset on watchdog, regardless
 * of the implementation.
 */
#define WATCHDOG
//#undef WATCHDOG

/* define TRACE_SERIAL to get debugging traces capabilities on the
 * MSP430 serial port
 * WARNING: This might disable some functions too, check the code
 * to see exactly what that does in this particular version */
//#define TRACE_SERIAL
#undef TRACE_SERIAL

/* define TEST_LOOP_SPEED (and TRACE_SERIAL) to trace the number
 * of iterations in the main loop in each state
 */
//#define TEST_LOOP_SPEED
#undef TEST_LOOP_SPEED

/* define LOOP_REBOOT if you want that the board reboot forever
 * define it to the number of ms to spend in the MACHINE_RUNNING state.
 */
//#define LOOP_REBOOT	MS(5000)
#undef LOOP_REBOOT

    ////////////////////////////////////////////////////////////////////

#if !defined(XIOH_V5) && !defined(XIOH_V6)
# error please define XIOH_V5 or XIOH_V6
#endif

#endif /* CONFIG_H */