aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/next_kbd.h
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-04-10 01:32:04 +0900
committertmk <hasu@tmk-kbd.com>2015-04-10 01:32:04 +0900
commit1a02ebcc612e9a9c0d87e02295c7258de3a70ccc (patch)
treee517f3c70bb2d542797e57d13e9023c84af230fb /tmk_core/protocol/next_kbd.h
parent6746e37088ce8ba03529c1226bd216705edb2b1f (diff)
parenta074364c3731d66b56d988c8a6c960a83ea0e0a1 (diff)
downloadqmk_firmware-1a02ebcc612e9a9c0d87e02295c7258de3a70ccc.tar.gz
qmk_firmware-1a02ebcc612e9a9c0d87e02295c7258de3a70ccc.zip
Merge commit 'a074364c3731d66b56d988c8a6c960a83ea0e0a1' as 'tmk_core'
Diffstat (limited to 'tmk_core/protocol/next_kbd.h')
-rw-r--r--tmk_core/protocol/next_kbd.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/tmk_core/protocol/next_kbd.h b/tmk_core/protocol/next_kbd.h
new file mode 100644
index 000000000..6d455d4fa
--- /dev/null
+++ b/tmk_core/protocol/next_kbd.h
@@ -0,0 +1,63 @@
1/*
2NeXT non-ADB Keyboard Protocol
3
4Copyright 2013, Benjamin Gould (bgould@github.com)
5
6Based on:
7TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
8Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license
9
10Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
11Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
12Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
13
14This software is licensed with a Modified BSD License.
15All of this is supposed to be Free Software, Open Source, DFSG-free,
16GPL-compatible, and OK to use in both free and proprietary applications.
17Additions and corrections to this file are welcome.
18
19Redistribution and use in source and binary forms, with or without
20modification, are permitted provided that the following conditions are met:
21
22* Redistributions of source code must retain the above copyright
23 notice, this list of conditions and the following disclaimer.
24
25* Redistributions in binary form must reproduce the above copyright
26 notice, this list of conditions and the following disclaimer in
27 the documentation and/or other materials provided with the
28 distribution.
29
30* Neither the name of the copyright holders nor the names of
31 contributors may be used to endorse or promote products derived
32 from this software without specific prior written permission.
33
34THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
38LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44POSSIBILITY OF SUCH DAMAGE.
45
46*/
47
48#include <stdbool.h>
49
50#ifndef NEXT_KBD_H
51#define NEXT_KBD_H
52
53#define NEXT_KBD_KMBUS_IDLE 0x300600
54#define NEXT_KBD_TIMING 50
55
56extern uint8_t next_kbd_error;
57
58/* host role */
59void next_kbd_init(void);
60void next_kbd_set_leds(bool left, bool right);
61uint32_t next_kbd_recv(void);
62
63#endif