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>
10 * This program is free software: you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 3 as published by
12 * the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 * You should have received a copy of the GNU General Public License along with
20 * this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef __STATIC_PROGRAMS_H
24 #define __STATIC_PROGRAMS_H
29 #include "../common/pt/pt.h"
32 /* return value is char, see definition of PT_THREAD() */
33 typedef char (*program_handler
)(struct process_t
*current
);
35 /* parameter structures (max 10 bytes) */
36 struct colorwheel_params_t
48 struct random_params_t
51 uint8_t use_address
:1;
52 uint8_t wait_for_fade
:1;
62 struct replay_params_t
73 union program_params_t
75 /* parameters for static programs */
76 uint8_t raw
[PROGRAM_PARAMETER_SIZE
];
77 struct colorwheel_params_t colorwheel
;
78 struct random_params_t random
;
79 struct replay_params_t replay
;
82 /* global process struct */
84 program_handler execute
;
87 union program_params_t params
;
92 /* global list of programs */
93 #define STATIC_PROGRAMS_LEN 3
94 extern program_handler static_programs
[];
96 PT_THREAD(program_colorwheel(struct process_t
*process
));
97 PT_THREAD(program_random(struct process_t
*process
));
98 PT_THREAD(program_replay(struct process_t
*process
));