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
;
44 extern struct global_remote_t global_remote
;
46 /* we depend on serial uart */
47 #if !CONFIG_SERIAL || !CONFIG_REMOTE
49 #define remote_init(...)
50 #define remote_poll(...)
51 #define remote_address(...) 0
53 #define remote_apply_offset(x, ...) x
54 #define remote_apply_hsv_offset(x, ...) x
56 #define remote_pull_int(...)
57 #define remote_release_int(...)
61 void remote_init(void);
62 void remote_poll(void);
63 #define remote_address() (global_remote.address)
65 void remote_pull_int(void);
66 void remote_release_int(void);
68 /* offset helper functions */
69 uint8_t remote_apply_offset(uint8_t value
, int8_t offset
);
70 void remote_apply_hsv_offset(struct hsv_color_t
*color
);