]> git.gir.st - tmk_keyboard.git/blob - tmk_core/protocol/next_kbd.h
Merge commit 'a074364c3731d66b56d988c8a6c960a83ea0e0a1' as 'tmk_core'
[tmk_keyboard.git] / tmk_core / protocol / next_kbd.h
1 /*
2 NeXT non-ADB Keyboard Protocol
3
4 Copyright 2013, Benjamin Gould (bgould@github.com)
5
6 Based on:
7 TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
8 Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license
9
10 Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
11 Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
12 Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
13
14 This software is licensed with a Modified BSD License.
15 All of this is supposed to be Free Software, Open Source, DFSG-free,
16 GPL-compatible, and OK to use in both free and proprietary applications.
17 Additions and corrections to this file are welcome.
18
19 Redistribution and use in source and binary forms, with or without
20 modification, 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
34 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
38 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44 POSSIBILITY 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
56 extern uint8_t next_kbd_error;
57
58 /* host role */
59 void next_kbd_init(void);
60 void next_kbd_set_leds(bool left, bool right);
61 uint32_t next_kbd_recv(void);
62
63 #endif
Imprint / Impressum