aboutsummaryrefslogtreecommitdiff
path: root/example_integration/callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'example_integration/callbacks.c')
-rw-r--r--example_integration/callbacks.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/example_integration/callbacks.c b/example_integration/callbacks.c
new file mode 100644
index 000000000..21b2d9f74
--- /dev/null
+++ b/example_integration/callbacks.c
@@ -0,0 +1,50 @@
1/*
2The MIT License (MIT)
3
4Copyright (c) 2016 Fred Sundvik
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice shall be included in all
14copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22SOFTWARE.
23*/
24
25This program is free software: you can redistribute it and/or modify
26it under the terms of the GNU General Public License as published by
27the Free Software Foundation, either version 2 of the License, or
28(at your option) any later version.
29
30This program is distributed in the hope that it will be useful,
31but WITHOUT ANY WARRANTY; without even the implied warranty of
32MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33GNU General Public License for more details.
34
35You should have received a copy of the GNU General Public License
36along with this program. If not, see <http://www.gnu.org/licenses/>.
37*/
38
39#include "keyboard.h"
40#include "action_layer.h"
41#include "visualizer.h"
42#include "host.h"
43
44void post_keyboard_init(void) {
45 visualizer_init();
46}
47
48void post_keyboard_task() {
49 visualizer_set_state(default_layer_state, layer_state, host_keyboard_leds());
50}