]>
Commit | Line | Data |
---|---|---|
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 | * | |
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. | |
13 | * | |
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 | |
17 | * more details. | |
18 | * | |
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/>. | |
21 | */ | |
22 | ||
23 | #ifndef __SCRIPT_H | |
24 | #define __SCRIPT_H | |
25 | ||
26 | #include <stdint.h> | |
27 | #include <stdbool.h> | |
28 | #include "globals.h" | |
29 | #include "../common/pt/pt.h" | |
30 | #include "timer.h" | |
31 | #include "static_programs.h" | |
32 | ||
33 | #if !CONFIG_SCRIPT | |
34 | #define script_init(...) | |
35 | #define script_poll(...) | |
36 | #define script_stop(...) | |
37 | #define script_start(...) | |
38 | #define script_start_default(...) | |
39 | ||
40 | #else | |
41 | ||
42 | struct global_script_t { | |
43 | bool disable; | |
44 | struct process_t tasks[CONFIG_SCRIPT_TASKS]; | |
45 | timer_t timer; | |
46 | }; | |
47 | ||
48 | /* global variables */ | |
49 | extern struct global_script_t global_script; | |
50 | ||
51 | /* prototypes for scripting engine */ | |
52 | void script_init(void); | |
53 | void script_poll(void); | |
54 | void script_stop(void); | |
55 | void script_start(uint8_t task, uint8_t index, union program_params_t *params); | |
56 | void script_start_default(void); | |
57 | ||
58 | #endif | |
59 | #endif |