]>
git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-firmware/fnordlicht.c
c0ff861958ed8a40e48ad2e4231faf1a1f658e5c
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/>.
26 #include "../common/io.h"
29 #include <avr/interrupt.h>
30 #include <avr/pgmspace.h>
33 #include "../common/common.h"
41 static void startup(void)
43 /* if configuration is valid */
44 if (storage_valid_config()) {
45 /* set global address to stored value */
46 global_remote
.address
= startup_config
.startup_addr
;
50 /* start default program: showcfg FIXME cleanup magic values */
51 script_start(0u, 4u, (union program_params_t
*)startup_config
.params
.program_parameters
);
53 /* or set some default color */
54 global_pwm
.target
.red
= 50u;
58 /* NEVER CALL DIRECTLY! */
59 void disable_watchdog(void) \
60 __attribute__((naked
)) \
61 __attribute__((section(".init3")));
62 void disable_watchdog(void)
79 /* do high-level startup configuration */
82 /* enable interrupts globally */
90 /* check for remote commands */
108 /* process storage requests */