]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-controller/globals.h
309f04c2fd43773b484fdd61af803b980e6b480a
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 /* serial communication is required */
50 #define CONFIG_SERIAL 1
53 #define LED_PORTNAME B
58 #define BTN_PORTNAME C
62 /* infrared receiver */
65 #define IR_INTNUM 9 /* PC1 is PCINT9 */
67 /* convenient naming */
68 #define LED_PORT _OUTPORT(LED_PORTNAME)
69 #define LED_DDR _DDRPORT(LED_PORTNAME)
71 #define BTN_PORT _OUTPORT(BTN_PORTNAME)
72 #define BTN_DDR _DDRPORT(BTN_PORTNAME)
73 #define BTN_PIN _INPORT(BTN_PORTNAME)
75 #endif /* _FNORDLICHT_CONFIG_H */