summaryrefslogtreecommitdiff
path: root/example_integration/callbacks.c
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-02-13 22:08:49 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-02-13 22:08:49 +0200
commit8479e6aa390bdd7711753d9fa1141bd1073e2b0a (patch)
treefb31943e155ab1f6563fb7855cbef39b2680cf50 /example_integration/callbacks.c
parent8ce60649c85f1ad5371d443675f91c8fc36c3d2e (diff)
Update readme and license
Also add integration examples
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 0000000000..21b2d9f748
--- /dev/null
+++ b/example_integration/callbacks.c
@@ -0,0 +1,50 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2016 Fred Sundvik
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "keyboard.h"
+#include "action_layer.h"
+#include "visualizer.h"
+#include "host.h"
+
+void post_keyboard_init(void) {
+ visualizer_init();
+}
+
+void post_keyboard_task() {
+ visualizer_set_state(default_layer_state, layer_state, host_keyboard_leds());
+}