]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-firmware/globals.h
1 /* vim:ts=4 sts=4 et tw=80
5 * for additional information please
6 * see http://lochraster.org/fnordlichtmini
8 * (c) by Alexander Neumann <alexander@bumpern.de>
9 * Lars Noschinski <lars@public.noschinski.de>
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.
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
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/>.
24 #ifndef _FNORDLICHT_GLOBALS_H
25 #define _FNORDLICHT_GLOBALS_H
27 #include <avr/version.h>
29 #include "../common/common.h"
31 /* check for avr-libc version */
32 #if __AVR_LIBC_VERSION__ < 10600UL
33 #error "newer libc version (>= 1.6.0) needed!"
36 /* check if cpu speed is defined */
38 #error "please define F_CPU! (see Makefile)"
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!"
46 /* fifo size should be a power of 2 and below 128 */
47 #define CONFIG_FIFO_SIZE 64
49 /* configure primary pwm pins (MUST be three successive pins in a port) */
51 #define PWM_CHANNELS 3
52 #define PWM_CHANNEL_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2))
55 /* configure secondary pwm pins (MUST be three successive pins in a port) */
57 #define PWM2_CHANNEL_MASK (_BV(PD5) | _BV(PD6) | _BV(PD7))
60 /* min brightness level */
61 #define PWM_MIN_BRIGHTNESS 10
63 /* configure maximal static program parameter size */
64 #define PROGRAM_PARAMETER_SIZE 10
66 /* number of color-configurations stored in EEPROM */
67 #define CONFIG_EEPROM_COLORS 60
69 /* define default supported number of tasks */
70 #define CONFIG_SCRIPT_TASKS 1
72 /* configure INT line for remote */
73 #define REMOTE_INT_PORT D
74 #define REMOTE_INT_PIN PD2
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
88 /* configure storage bufer size */
89 #define STORAGE_BUFFER_SIZE 13
91 #endif /* _FNORDLICHT_CONFIG_H */