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/>.
30 struct remote_offsets_t
39 struct global_remote_t
{
41 struct remote_offsets_t offsets
;
43 #if CONFIG_MASTER_MODE
49 extern struct global_remote_t global_remote
;
51 /* we depend on serial uart */
52 #if !CONFIG_SERIAL || !CONFIG_REMOTE
54 #define remote_init(...)
55 #define remote_poll(...)
56 #define remote_address(...) 0
58 #define remote_apply_offset(x, ...) x
59 #define remote_apply_hsv_offset(x, ...) x
61 #define remote_pull_int(...)
62 #define remote_release_int(...)
66 void remote_init(void);
67 void remote_poll(void);
68 #define remote_address() (global_remote.address)
70 void remote_pull_int(void);
71 void remote_release_int(void);
73 /* offset helper functions */
74 uint8_t remote_apply_offset(uint8_t value
, int8_t offset
);
75 void remote_apply_hsv_offset(struct hsv_color_t
*color
);