]> git.zerfleddert.de Git - fnordlicht-mini/blame - firmware/fnordlicht-firmware/globals.h
reference firmware
[fnordlicht-mini] / firmware / fnordlicht-firmware / globals.h
CommitLineData
ec1bef8e 1/* vim:ts=4 sts=4 et tw=80
2 *
3 * fnordlicht firmware
4 *
5 * for additional information please
6 * see http://lochraster.org/fnordlichtmini
7 *
8 * (c) by Alexander Neumann <alexander@bumpern.de>
9 * Lars Noschinski <lars@public.noschinski.de>
10 *
11 * This program is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 3 as published by
13 * the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * more details.
19 *
20 * You should have received a copy of the GNU General Public License along with
21 * this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#ifndef _FNORDLICHT_GLOBALS_H
25#define _FNORDLICHT_GLOBALS_H
26
27#include <avr/version.h>
28#include "config.h"
29#include "../common/common.h"
30
31/* check for avr-libc version */
32#if __AVR_LIBC_VERSION__ < 10600UL
33#error "newer libc version (>= 1.6.0) needed!"
34#endif
35
36/* check if cpu speed is defined */
37#ifndef F_CPU
38#error "please define F_CPU! (see Makefile)"
39#endif
40
41/* check if this cpu is supported */
42#if !(defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__))
43#error "this cpu is not supported yet!"
44#endif
45
46/* fifo size should be a power of 2 and below 128 */
47#define CONFIG_FIFO_SIZE 64
48
49/* configure primary pwm pins (MUST be three successive pins in a port) */
50#define PWM_PORT B
51#define PWM_CHANNELS 3
52#define PWM_CHANNEL_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2))
53#define PWM_SHIFT 0
54
55/* configure secondary pwm pins (MUST be three successive pins in a port) */
56#define PWM2_PORT D
57#define PWM2_CHANNEL_MASK (_BV(PD5) | _BV(PD6) | _BV(PD7))
58#define PWM2_SHIFT 5
59
60/* min brightness level */
61#define PWM_MIN_BRIGHTNESS 10
62
63/* configure maximal static program parameter size */
64#define PROGRAM_PARAMETER_SIZE 10
65
66/* number of color-configurations stored in EEPROM */
67#define CONFIG_EEPROM_COLORS 60
68
69/* define default supported number of tasks */
70#define CONFIG_SCRIPT_TASKS 1
71
72/* configure INT line for remote */
73#define REMOTE_INT_PORT D
74#define REMOTE_INT_PIN PD2
75
76/* configure jumper pins for remote master mode */
77#define REMOTE_MASTER_PORT C
78#define REMOTE_MASTER_PIN1 PC2
79#define REMOTE_MASTER_PIN2 PC3
80/* configure master mode */
81/* use 1 as address for the second device */
82#define MASTER_MODE_FIRST_ADDRESS 1
83/* wait 200ms before sending sync sequence */
84#define MASTER_WAIT_BEFORE_SYNC 20
85/* wait 15 min (900s) between program changes */
86#define MASTER_MODE_SLEEP 900
87
88/* configure storage bufer size */
89#define STORAGE_BUFFER_SIZE 13
90
91#endif /* _FNORDLICHT_CONFIG_H */
Impressum, Datenschutz