From aeade1b1972c8d3d8f32dd21e1ae31e6c9e702db Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 29 May 2017 15:37:19 -0400 Subject: =?UTF-8?q?Fork=20Let=E2=80=99s=20Split=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/nyquist/Makefile | 5 + keyboards/nyquist/common/glcdfont.c | 276 + keyboards/nyquist/config.h | 32 + keyboards/nyquist/i2c.c | 162 + keyboards/nyquist/i2c.h | 49 + keyboards/nyquist/imgs/left.stl | Bin 0 -> 106984 bytes keyboards/nyquist/imgs/lets split rev2 case.iges | 17931 +++++++++++++++++++ keyboards/nyquist/imgs/letssplitv2.svg | 4077 +++++ keyboards/nyquist/imgs/plate.stl | Bin 0 -> 102484 bytes keyboards/nyquist/imgs/right.stl | Bin 0 -> 135384 bytes .../nyquist/imgs/split-keyboard-i2c-schematic.png | Bin 0 -> 26565 bytes .../imgs/split-keyboard-serial-schematic.png | Bin 0 -> 19487 bytes keyboards/nyquist/keymaps/hexwire/Makefile | 5 + keyboards/nyquist/keymaps/hexwire/README.md | 108 + .../nyquist/keymaps/hexwire/Underglow Pinouts.md | 20 + keyboards/nyquist/keymaps/hexwire/config.h | 35 + keyboards/nyquist/keymaps/hexwire/keymap.c | 205 + .../nyquist/keymaps/hexwire/keymap_to_readme.rb | 40 + keyboards/nyquist/keymaps/i2c/config.h | 31 + keyboards/nyquist/keymaps/i2c/keymap.c | 214 + keyboards/nyquist/keymaps/serial/config.h | 34 + keyboards/nyquist/keymaps/serial/keymap.c | 214 + keyboards/nyquist/lets_split.c | 1 + keyboards/nyquist/lets_split.h | 30 + keyboards/nyquist/matrix.c | 316 + keyboards/nyquist/pro_micro.h | 362 + keyboards/nyquist/readme.md | 182 + keyboards/nyquist/rev1/Makefile | 3 + keyboards/nyquist/rev1/config.h | 91 + keyboards/nyquist/rev1/rev1.c | 32 + keyboards/nyquist/rev1/rev1.h | 28 + keyboards/nyquist/rev1/rules.mk | 5 + keyboards/nyquist/rev2/Makefile | 3 + keyboards/nyquist/rev2/config.h | 91 + keyboards/nyquist/rev2/rev2.c | 39 + keyboards/nyquist/rev2/rev2.h | 60 + keyboards/nyquist/rev2/rules.mk | 5 + keyboards/nyquist/rules.mk | 88 + keyboards/nyquist/serial.c | 228 + keyboards/nyquist/serial.h | 26 + keyboards/nyquist/split_util.c | 84 + keyboards/nyquist/split_util.h | 24 + keyboards/nyquist/ssd1306.c | 470 + keyboards/nyquist/ssd1306.h | 17 + 44 files changed, 25623 insertions(+) create mode 100644 keyboards/nyquist/Makefile create mode 100644 keyboards/nyquist/common/glcdfont.c create mode 100644 keyboards/nyquist/config.h create mode 100644 keyboards/nyquist/i2c.c create mode 100644 keyboards/nyquist/i2c.h create mode 100644 keyboards/nyquist/imgs/left.stl create mode 100644 keyboards/nyquist/imgs/lets split rev2 case.iges create mode 100644 keyboards/nyquist/imgs/letssplitv2.svg create mode 100644 keyboards/nyquist/imgs/plate.stl create mode 100644 keyboards/nyquist/imgs/right.stl create mode 100644 keyboards/nyquist/imgs/split-keyboard-i2c-schematic.png create mode 100644 keyboards/nyquist/imgs/split-keyboard-serial-schematic.png create mode 100644 keyboards/nyquist/keymaps/hexwire/Makefile create mode 100644 keyboards/nyquist/keymaps/hexwire/README.md create mode 100644 keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md create mode 100644 keyboards/nyquist/keymaps/hexwire/config.h create mode 100644 keyboards/nyquist/keymaps/hexwire/keymap.c create mode 100755 keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb create mode 100644 keyboards/nyquist/keymaps/i2c/config.h create mode 100644 keyboards/nyquist/keymaps/i2c/keymap.c create mode 100644 keyboards/nyquist/keymaps/serial/config.h create mode 100644 keyboards/nyquist/keymaps/serial/keymap.c create mode 100644 keyboards/nyquist/lets_split.c create mode 100644 keyboards/nyquist/lets_split.h create mode 100644 keyboards/nyquist/matrix.c create mode 100644 keyboards/nyquist/pro_micro.h create mode 100644 keyboards/nyquist/readme.md create mode 100644 keyboards/nyquist/rev1/Makefile create mode 100644 keyboards/nyquist/rev1/config.h create mode 100644 keyboards/nyquist/rev1/rev1.c create mode 100644 keyboards/nyquist/rev1/rev1.h create mode 100644 keyboards/nyquist/rev1/rules.mk create mode 100644 keyboards/nyquist/rev2/Makefile create mode 100644 keyboards/nyquist/rev2/config.h create mode 100644 keyboards/nyquist/rev2/rev2.c create mode 100644 keyboards/nyquist/rev2/rev2.h create mode 100644 keyboards/nyquist/rev2/rules.mk create mode 100644 keyboards/nyquist/rules.mk create mode 100644 keyboards/nyquist/serial.c create mode 100644 keyboards/nyquist/serial.h create mode 100644 keyboards/nyquist/split_util.c create mode 100644 keyboards/nyquist/split_util.h create mode 100644 keyboards/nyquist/ssd1306.c create mode 100644 keyboards/nyquist/ssd1306.h (limited to 'keyboards/nyquist') diff --git a/keyboards/nyquist/Makefile b/keyboards/nyquist/Makefile new file mode 100644 index 0000000000..f5c87d4d65 --- /dev/null +++ b/keyboards/nyquist/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = rev2 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/nyquist/common/glcdfont.c b/keyboards/nyquist/common/glcdfont.c new file mode 100644 index 0000000000..6f88bd23a7 --- /dev/null +++ b/keyboards/nyquist/common/glcdfont.c @@ -0,0 +1,276 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, + 0x00, 0x18, 0x3C, 0x18, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, + 0x00, 0x18, 0x24, 0x18, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, + 0x30, 0x48, 0x3A, 0x06, 0x0E, + 0x26, 0x29, 0x79, 0x29, 0x26, + 0x40, 0x7F, 0x05, 0x05, 0x07, + 0x40, 0x7F, 0x05, 0x25, 0x3F, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, + 0x14, 0x22, 0x7F, 0x22, 0x14, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, + 0x06, 0x09, 0x7F, 0x01, 0x7F, + 0x00, 0x66, 0x89, 0x95, 0x6A, + 0x60, 0x60, 0x60, 0x60, 0x60, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, + 0x08, 0x04, 0x7E, 0x04, 0x08, + 0x10, 0x20, 0x7E, 0x20, 0x10, + 0x08, 0x08, 0x2A, 0x1C, 0x08, + 0x08, 0x1C, 0x2A, 0x08, 0x08, + 0x1E, 0x10, 0x10, 0x10, 0x10, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, + 0x30, 0x38, 0x3E, 0x38, 0x30, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, + 0x23, 0x13, 0x08, 0x64, 0x62, + 0x36, 0x49, 0x56, 0x20, 0x50, + 0x00, 0x08, 0x07, 0x03, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, + 0x08, 0x08, 0x3E, 0x08, 0x08, + 0x00, 0x80, 0x70, 0x30, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, + 0x00, 0x00, 0x60, 0x60, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, + 0x3E, 0x51, 0x49, 0x45, 0x3E, + 0x00, 0x42, 0x7F, 0x40, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, + 0x21, 0x41, 0x49, 0x4D, 0x33, + 0x18, 0x14, 0x12, 0x7F, 0x10, + 0x27, 0x45, 0x45, 0x45, 0x39, + 0x3C, 0x4A, 0x49, 0x49, 0x31, + 0x41, 0x21, 0x11, 0x09, 0x07, + 0x36, 0x49, 0x49, 0x49, 0x36, + 0x46, 0x49, 0x49, 0x29, 0x1E, + 0x00, 0x00, 0x14, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, + 0x14, 0x14, 0x14, 0x14, 0x14, + 0x00, 0x41, 0x22, 0x14, 0x08, + 0x02, 0x01, 0x59, 0x09, 0x06, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, + 0x7C, 0x12, 0x11, 0x12, 0x7C, + 0x7F, 0x49, 0x49, 0x49, 0x36, + 0x3E, 0x41, 0x41, 0x41, 0x22, + 0x7F, 0x41, 0x41, 0x41, 0x3E, + 0x7F, 0x49, 0x49, 0x49, 0x41, + 0x7F, 0x09, 0x09, 0x09, 0x01, + 0x3E, 0x41, 0x41, 0x51, 0x73, + 0x7F, 0x08, 0x08, 0x08, 0x7F, + 0x00, 0x41, 0x7F, 0x41, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, + 0x7F, 0x08, 0x14, 0x22, 0x41, + 0x7F, 0x40, 0x40, 0x40, 0x40, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, + 0x7F, 0x04, 0x08, 0x10, 0x7F, + 0x3E, 0x41, 0x41, 0x41, 0x3E, + 0x7F, 0x09, 0x09, 0x09, 0x06, + 0x3E, 0x41, 0x51, 0x21, 0x5E, + 0x7F, 0x09, 0x19, 0x29, 0x46, + 0x26, 0x49, 0x49, 0x49, 0x32, + 0x03, 0x01, 0x7F, 0x01, 0x03, + 0x3F, 0x40, 0x40, 0x40, 0x3F, + 0x1F, 0x20, 0x40, 0x20, 0x1F, + 0x3F, 0x40, 0x38, 0x40, 0x3F, + 0x63, 0x14, 0x08, 0x14, 0x63, + 0x03, 0x04, 0x78, 0x04, 0x03, + 0x61, 0x59, 0x49, 0x4D, 0x43, + 0x00, 0x7F, 0x41, 0x41, 0x41, + 0x02, 0x04, 0x08, 0x10, 0x20, + 0x00, 0x41, 0x41, 0x41, 0x7F, + 0x04, 0x02, 0x01, 0x02, 0x04, + 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x03, 0x07, 0x08, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, + 0x7F, 0x28, 0x44, 0x44, 0x38, + 0x38, 0x44, 0x44, 0x44, 0x28, + 0x38, 0x44, 0x44, 0x28, 0x7F, + 0x38, 0x54, 0x54, 0x54, 0x18, + 0x00, 0x08, 0x7E, 0x09, 0x02, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, + 0x7F, 0x08, 0x04, 0x04, 0x78, + 0x00, 0x44, 0x7D, 0x40, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, + 0x7C, 0x08, 0x04, 0x04, 0x78, + 0x38, 0x44, 0x44, 0x44, 0x38, + 0xFC, 0x18, 0x24, 0x24, 0x18, + 0x18, 0x24, 0x24, 0x18, 0xFC, + 0x7C, 0x08, 0x04, 0x04, 0x08, + 0x48, 0x54, 0x54, 0x54, 0x24, + 0x04, 0x04, 0x3F, 0x44, 0x24, + 0x3C, 0x40, 0x40, 0x20, 0x7C, + 0x1C, 0x20, 0x40, 0x20, 0x1C, + 0x3C, 0x40, 0x30, 0x40, 0x3C, + 0x44, 0x28, 0x10, 0x28, 0x44, + 0x4C, 0x90, 0x90, 0x90, 0x7C, + 0x44, 0x64, 0x54, 0x4C, 0x44, + 0x00, 0x08, 0x36, 0x41, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, + 0x3C, 0x26, 0x23, 0x26, 0x3C, + 0x1E, 0xA1, 0xA1, 0x61, 0x12, + 0x3A, 0x40, 0x40, 0x20, 0x7A, + 0x38, 0x54, 0x54, 0x55, 0x59, + 0x21, 0x55, 0x55, 0x79, 0x41, + 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut + 0x21, 0x55, 0x54, 0x78, 0x40, + 0x20, 0x54, 0x55, 0x79, 0x40, + 0x0C, 0x1E, 0x52, 0x72, 0x12, + 0x39, 0x55, 0x55, 0x55, 0x59, + 0x39, 0x54, 0x54, 0x54, 0x59, + 0x39, 0x55, 0x54, 0x54, 0x58, + 0x00, 0x00, 0x45, 0x7C, 0x41, + 0x00, 0x02, 0x45, 0x7D, 0x42, + 0x00, 0x01, 0x45, 0x7C, 0x40, + 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut + 0xF0, 0x28, 0x25, 0x28, 0xF0, + 0x7C, 0x54, 0x55, 0x45, 0x00, + 0x20, 0x54, 0x54, 0x7C, 0x54, + 0x7C, 0x0A, 0x09, 0x7F, 0x49, + 0x32, 0x49, 0x49, 0x49, 0x32, + 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut + 0x32, 0x4A, 0x48, 0x48, 0x30, + 0x3A, 0x41, 0x41, 0x21, 0x7A, + 0x3A, 0x42, 0x40, 0x20, 0x78, + 0x00, 0x9D, 0xA0, 0xA0, 0x7D, + 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut + 0x3D, 0x40, 0x40, 0x40, 0x3D, + 0x3C, 0x24, 0xFF, 0x24, 0x24, + 0x48, 0x7E, 0x49, 0x43, 0x66, + 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, + 0xFF, 0x09, 0x29, 0xF6, 0x20, + 0xC0, 0x88, 0x7E, 0x09, 0x03, + 0x20, 0x54, 0x54, 0x79, 0x41, + 0x00, 0x00, 0x44, 0x7D, 0x41, + 0x30, 0x48, 0x48, 0x4A, 0x32, + 0x38, 0x40, 0x40, 0x22, 0x7A, + 0x00, 0x7A, 0x0A, 0x0A, 0x72, + 0x7D, 0x0D, 0x19, 0x31, 0x7D, + 0x26, 0x29, 0x29, 0x2F, 0x28, + 0x26, 0x29, 0x29, 0x29, 0x26, + 0x30, 0x48, 0x4D, 0x40, 0x20, + 0x38, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x38, + 0x2F, 0x10, 0xC8, 0xAC, 0xBA, + 0x2F, 0x10, 0x28, 0x34, 0xFA, + 0x00, 0x00, 0x7B, 0x00, 0x00, + 0x08, 0x14, 0x2A, 0x14, 0x22, + 0x22, 0x14, 0x2A, 0x14, 0x08, + 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code + 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block + 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block + 0x00, 0x00, 0x00, 0xFF, 0x00, + 0x10, 0x10, 0x10, 0xFF, 0x00, + 0x14, 0x14, 0x14, 0xFF, 0x00, + 0x10, 0x10, 0xFF, 0x00, 0xFF, + 0x10, 0x10, 0xF0, 0x10, 0xF0, + 0x14, 0x14, 0x14, 0xFC, 0x00, + 0x14, 0x14, 0xF7, 0x00, 0xFF, + 0x00, 0x00, 0xFF, 0x00, 0xFF, + 0x14, 0x14, 0xF4, 0x04, 0xFC, + 0x14, 0x14, 0x17, 0x10, 0x1F, + 0x10, 0x10, 0x1F, 0x10, 0x1F, + 0x14, 0x14, 0x14, 0x1F, 0x00, + 0x10, 0x10, 0x10, 0xF0, 0x00, + 0x00, 0x00, 0x00, 0x1F, 0x10, + 0x10, 0x10, 0x10, 0x1F, 0x10, + 0x10, 0x10, 0x10, 0xF0, 0x10, + 0x00, 0x00, 0x00, 0xFF, 0x10, + 0x10, 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0xFF, 0x10, + 0x00, 0x00, 0x00, 0xFF, 0x14, + 0x00, 0x00, 0xFF, 0x00, 0xFF, + 0x00, 0x00, 0x1F, 0x10, 0x17, + 0x00, 0x00, 0xFC, 0x04, 0xF4, + 0x14, 0x14, 0x17, 0x10, 0x17, + 0x14, 0x14, 0xF4, 0x04, 0xF4, + 0x00, 0x00, 0xFF, 0x00, 0xF7, + 0x14, 0x14, 0x14, 0x14, 0x14, + 0x14, 0x14, 0xF7, 0x00, 0xF7, + 0x14, 0x14, 0x14, 0x17, 0x14, + 0x10, 0x10, 0x1F, 0x10, 0x1F, + 0x14, 0x14, 0x14, 0xF4, 0x14, + 0x10, 0x10, 0xF0, 0x10, 0xF0, + 0x00, 0x00, 0x1F, 0x10, 0x1F, + 0x00, 0x00, 0x00, 0x1F, 0x14, + 0x00, 0x00, 0x00, 0xFC, 0x14, + 0x00, 0x00, 0xF0, 0x10, 0xF0, + 0x10, 0x10, 0xFF, 0x10, 0xFF, + 0x14, 0x14, 0x14, 0xFF, 0x14, + 0x10, 0x10, 0x10, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0x10, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, + 0x38, 0x44, 0x44, 0x38, 0x44, + 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta + 0x7E, 0x02, 0x02, 0x06, 0x06, + 0x02, 0x7E, 0x02, 0x7E, 0x02, + 0x63, 0x55, 0x49, 0x41, 0x63, + 0x38, 0x44, 0x44, 0x3C, 0x04, + 0x40, 0x7E, 0x20, 0x1E, 0x20, + 0x06, 0x02, 0x7E, 0x02, 0x02, + 0x99, 0xA5, 0xE7, 0xA5, 0x99, + 0x1C, 0x2A, 0x49, 0x2A, 0x1C, + 0x4C, 0x72, 0x01, 0x72, 0x4C, + 0x30, 0x4A, 0x4D, 0x4D, 0x30, + 0x30, 0x48, 0x78, 0x48, 0x30, + 0xBC, 0x62, 0x5A, 0x46, 0x3D, + 0x3E, 0x49, 0x49, 0x49, 0x00, + 0x7E, 0x01, 0x01, 0x01, 0x7E, + 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, + 0x44, 0x44, 0x5F, 0x44, 0x44, + 0x40, 0x51, 0x4A, 0x44, 0x40, + 0x40, 0x44, 0x4A, 0x51, 0x40, + 0x00, 0x00, 0xFF, 0x01, 0x03, + 0xE0, 0x80, 0xFF, 0x00, 0x00, + 0x08, 0x08, 0x6B, 0x6B, 0x08, + 0x36, 0x12, 0x36, 0x24, 0x36, + 0x06, 0x0F, 0x09, 0x0F, 0x06, + 0x00, 0x00, 0x18, 0x18, 0x00, + 0x00, 0x00, 0x10, 0x10, 0x00, + 0x30, 0x40, 0xFF, 0x01, 0x01, + 0x00, 0x1F, 0x01, 0x01, 0x1E, + 0x00, 0x19, 0x1D, 0x17, 0x12, + 0x00, 0x3C, 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP +}; +#endif // FONT5X7_H diff --git a/keyboards/nyquist/config.h b/keyboards/nyquist/config.h new file mode 100644 index 0000000000..008fb09789 --- /dev/null +++ b/keyboards/nyquist/config.h @@ -0,0 +1,32 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif +#endif diff --git a/keyboards/nyquist/i2c.c b/keyboards/nyquist/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/nyquist/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/nyquist/imgs/left.stl b/keyboards/nyquist/imgs/left.stl new file mode 100644 index 0000000000..ea738d6260 Binary files /dev/null and b/keyboards/nyquist/imgs/left.stl differ diff --git a/keyboards/nyquist/imgs/lets split rev2 case.iges b/keyboards/nyquist/imgs/lets split rev2 case.iges new file mode 100644 index 0000000000..5677d09704 --- /dev/null +++ b/keyboards/nyquist/imgs/lets split rev2 case.iges @@ -0,0 +1,17931 @@ + S 1 +,,20Hlets split rev2 case,20Hlets split rev2 case,7Hunknown,7Hunknown, G 1 +32,38,7,99,15,,1.,2,2HMM,1,0.08,15H20161218.141108,0.01,10000.,7HunknownG 2 +,7Hunknown,11,0,; G 3 + 186 1 00000000D 1 + 186 -5703 1 0 0D 2 + 186 2 00000000D 3 + 186 -5705 1 0 0D 4 + 186 3 00000000D 5 + 186 -5705 1 0 0D 6 + 514 4 00010000D 7 + 514 29 1 0D 8 + 514 33 00010000D 9 + 514 7 1 0D 10 + 514 40 00010000D 11 + 514 9 1 0D 12 + 510 49 00010000D 13 + 510 -5703 1 1 0D 14 + 510 50 00010000D 15 + 510 -5703 1 1 0D 16 + 510 51 00010000D 17 + 510 -5703 1 1 0D 18 + 510 52 00010000D 19 + 510 -5703 1 1 0D 20 + 510 53 00010000D 21 + 510 -5703 1 1 0D 22 + 510 54 00010000D 23 + 510 -5703 1 1 0D 24 + 510 55 00010000D 25 + 510 -5703 1 1 0D 26 + 510 56 00010000D 27 + 510 -5703 1 1 0D 28 + 510 57 00010000D 29 + 510 -5703 1 1 0D 30 + 510 58 00010000D 31 + 510 -5703 1 1 0D 32 + 510 59 00010000D 33 + 510 -5703 1 1 0D 34 + 510 60 00010000D 35 + 510 -5703 1 1 0D 36 + 510 61 00010000D 37 + 510 -5703 1 1 0D 38 + 510 62 00010000D 39 + 510 -5703 1 1 0D 40 + 510 63 00010000D 41 + 510 -5703 1 1 0D 42 + 510 64 00010000D 43 + 510 -5703 1 1 0D 44 + 510 65 00010000D 45 + 510 -5703 1 1 0D 46 + 510 66 00010000D 47 + 510 -5703 1 1 0D 48 + 510 67 00010000D 49 + 510 -5703 1 1 0D 50 + 510 68 00010000D 51 + 510 -5703 1 1 0D 52 + 510 69 00010000D 53 + 510 -5703 1 1 0D 54 + 510 70 00010000D 55 + 510 -5703 1 1 0D 56 + 510 71 00010000D 57 + 510 -5703 1 1 0D 58 + 510 72 00010000D 59 + 510 -5703 1 1 0D 60 + 510 73 00010000D 61 + 510 -5703 1 1 0D 62 + 510 74 00010000D 63 + 510 -5703 1 1 0D 64 + 510 75 00010000D 65 + 510 -5703 1 1 0D 66 + 510 76 00010000D 67 + 510 -5703 1 1 0D 68 + 510 77 00010000D 69 + 510 -5703 1 1 0D 70 + 510 78 00010000D 71 + 510 -5703 1 1 0D 72 + 510 79 00010000D 73 + 510 -5703 1 1 0D 74 + 510 80 00010000D 75 + 510 -5703 1 1 0D 76 + 510 81 00010000D 77 + 510 -5703 1 1 0D 78 + 510 82 00010000D 79 + 510 -5703 1 1 0D 80 + 510 83 00010000D 81 + 510 -5703 1 1 0D 82 + 510 84 00010000D 83 + 510 -5703 1 1 0D 84 + 510 85 00010000D 85 + 510 -5703 1 1 0D 86 + 510 86 00010000D 87 + 510 -5703 1 1 0D 88 + 510 87 00010000D 89 + 510 -5703 1 1 0D 90 + 510 88 00010000D 91 + 510 -5703 1 1 0D 92 + 510 89 00010000D 93 + 510 -5703 1 1 0D 94 + 510 90 00010000D 95 + 510 -5703 1 1 0D 96 + 510 91 00010000D 97 + 510 -5703 1 1 0D 98 + 510 92 00010000D 99 + 510 -5703 1 1 0D 100 + 510 93 00010000D 101 + 510 -5703 1 1 0D 102 + 510 94 00010000D 103 + 510 -5703 1 1 0D 104 + 510 95 00010000D 105 + 510 -5703 1 1 0D 106 + 510 96 00010000D 107 + 510 -5703 1 1 0D 108 + 510 97 00010000D 109 + 510 -5703 1 1 0D 110 + 510 98 00010000D 111 + 510 -5703 1 1 0D 112 + 510 99 00010000D 113 + 510 -5703 1 1 0D 114 + 510 100 00010000D 115 + 510 -5703 1 1 0D 116 + 510 101 00010000D 117 + 510 -5703 1 1 0D 118 + 510 102 00010000D 119 + 510 -5703 1 1 0D 120 + 510 103 00010000D 121 + 510 -5703 1 1 0D 122 + 510 104 00010000D 123 + 510 -5703 1 1 0D 124 + 510 105 00010000D 125 + 510 -5703 1 1 0D 126 + 510 106 00010000D 127 + 510 -5703 1 1 0D 128 + 510 107 00010000D 129 + 510 -5703 1 1 0D 130 + 510 108 00010000D 131 + 510 -5703 1 1 0D 132 + 510 109 00010000D 133 + 510 -5703 1 1 0D 134 + 510 110 00010000D 135 + 510 -5703 1 1 0D 136 + 510 111 00010000D 137 + 510 -5703 1 1 0D 138 + 510 112 00010000D 139 + 510 -5703 1 1 0D 140 + 510 113 00010000D 141 + 510 -5703 1 1 0D 142 + 510 114 00010000D 143 + 510 -5703 1 1 0D 144 + 510 115 00010000D 145 + 510 -5703 1 1 0D 146 + 510 116 00010000D 147 + 510 -5703 1 1 0D 148 + 510 117 00010000D 149 + 510 -5703 1 1 0D 150 + 510 118 00010000D 151 + 510 -5703 1 1 0D 152 + 510 119 00010000D 153 + 510 -5703 1 1 0D 154 + 510 120 00010000D 155 + 510 -5703 1 1 0D 156 + 510 121 00010000D 157 + 510 -5703 1 1 0D 158 + 510 122 00010000D 159 + 510 -5703 1 1 0D 160 + 510 123 00010000D 161 + 510 -5703 1 1 0D 162 + 510 124 00010000D 163 + 510 -5703 1 1 0D 164 + 510 125 00010000D 165 + 510 -5703 1 1 0D 166 + 510 126 00010000D 167 + 510 -5703 1 1 0D 168 + 510 127 00010000D 169 + 510 -5703 1 1 0D 170 + 510 128 00010000D 171 + 510 -5703 1 1 0D 172 + 510 129 00010000D 173 + 510 -5703 1 1 0D 174 + 510 130 00010000D 175 + 510 -5703 1 1 0D 176 + 510 131 00010000D 177 + 510 -5703 1 1 0D 178 + 510 132 00010000D 179 + 510 -5703 1 1 0D 180 + 510 133 00010000D 181 + 510 -5703 1 1 0D 182 + 510 134 00010000D 183 + 510 -5703 1 1 0D 184 + 510 135 00010000D 185 + 510 -5703 1 1 0D 186 + 510 136 00010000D 187 + 510 -5703 1 1 0D 188 + 510 137 00010000D 189 + 510 -5703 1 1 0D 190 + 510 138 00010000D 191 + 510 -5703 1 1 0D 192 + 510 139 00010000D 193 + 510 -5703 1 1 0D 194 + 510 140 00010000D 195 + 510 -5703 1 1 0D 196 + 510 141 00010000D 197 + 510 -5703 1 1 0D 198 + 510 142 00010000D 199 + 510 -5703 1 1 0D 200 + 510 143 00010000D 201 + 510 -5703 1 1 0D 202 + 510 144 00010000D 203 + 510 -5703 1 1 0D 204 + 510 145 00010000D 205 + 510 -5703 1 1 0D 206 + 510 146 00010000D 207 + 510 -5703 1 1 0D 208 + 510 147 00010000D 209 + 510 -5703 1 1 0D 210 + 510 148 00010000D 211 + 510 -5703 1 1 0D 212 + 510 149 00010000D 213 + 510 -5703 1 1 0D 214 + 510 150 00010000D 215 + 510 -5703 1 1 0D 216 + 510 151 00010000D 217 + 510 -5703 1 1 0D 218 + 510 152 00010000D 219 + 510 -5703 1 1 0D 220 + 510 153 00010000D 221 + 510 -5703 1 1 0D 222 + 510 154 00010000D 223 + 510 -5703 1 1 0D 224 + 510 155 00010000D 225 + 510 -5703 1 1 0D 226 + 510 156 00010000D 227 + 510 -5703 1 1 0D 228 + 510 157 00010000D 229 + 510 -5703 1 1 0D 230 + 510 158 00010000D 231 + 510 -5703 1 1 0D 232 + 510 159 00010000D 233 + 510 -5703 1 1 0D 234 + 510 160 00010000D 235 + 510 -5703 1 1 0D 236 + 510 161 00010000D 237 + 510 -5703 1 1 0D 238 + 510 162 00010000D 239 + 510 -5703 1 1 0D 240 + 510 163 00010000D 241 + 510 -5703 1 1 0D 242 + 510 164 00010000D 243 + 510 -5703 1 1 0D 244 + 510 165 00010000D 245 + 510 -5703 1 1 0D 246 + 510 166 00010000D 247 + 510 -5703 1 1 0D 248 + 510 167 00010000D 249 + 510 -5703 1 1 0D 250 + 510 168 00010000D 251 + 510 -5703 1 1 0D 252 + 510 169 00010000D 253 + 510 -5703 1 1 0D 254 + 510 170 00010000D 255 + 510 -5703 1 1 0D 256 + 510 171 00010000D 257 + 510 -5703 1 1 0D 258 + 510 172 00010000D 259 + 510 -5703 1 1 0D 260 + 510 173 00010000D 261 + 510 -5703 1 1 0D 262 + 510 174 00010000D 263 + 510 -5703 1 1 0D 264 + 510 175 00010000D 265 + 510 -5703 1 1 0D 266 + 510 176 00010000D 267 + 510 -5703 1 1 0D 268 + 510 177 00010000D 269 + 510 -5703 1 1 0D 270 + 510 178 00010000D 271 + 510 -5703 1 1 0D 272 + 510 179 00010000D 273 + 510 -5703 1 1 0D 274 + 510 180 00010000D 275 + 510 -5703 1 1 0D 276 + 510 181 00010000D 277 + 510 -5703 1 1 0D 278 + 510 182 00010000D 279 + 510 -5703 1 1 0D 280 + 510 183 00010000D 281 + 510 -5703 1 1 0D 282 + 510 184 00010000D 283 + 510 -5703 1 1 0D 284 + 510 185 00010000D 285 + 510 -5703 1 1 0D 286 + 510 186 00010000D 287 + 510 -5703 1 1 0D 288 + 510 187 00010000D 289 + 510 -5703 1 1 0D 290 + 510 188 00010000D 291 + 510 -5703 1 1 0D 292 + 510 189 00010000D 293 + 510 -5703 1 1 0D 294 + 510 190 00010000D 295 + 510 -5703 1 1 0D 296 + 510 191 00010000D 297 + 510 -5703 1 1 0D 298 + 510 192 00010000D 299 + 510 -5703 1 1 0D 300 + 510 193 00010000D 301 + 510 -5703 1 1 0D 302 + 510 194 00010000D 303 + 510 -5703 1 1 0D 304 + 510 195 00010000D 305 + 510 -5703 1 1 0D 306 + 510 196 00010000D 307 + 510 -5703 1 1 0D 308 + 510 197 00010000D 309 + 510 -5703 1 1 0D 310 + 510 198 00010000D 311 + 510 -5703 1 1 0D 312 + 510 199 00010000D 313 + 510 -5703 1 1 0D 314 + 510 200 00010000D 315 + 510 -5703 1 1 0D 316 + 510 201 00010000D 317 + 510 -5703 1 1 0D 318 + 510 202 00010000D 319 + 510 -5703 1 1 0D 320 + 510 203 00010000D 321 + 510 -5703 1 1 0D 322 + 510 204 00010000D 323 + 510 -5703 1 1 0D 324 + 510 205 00010000D 325 + 510 -5703 1 1 0D 326 + 510 206 00010000D 327 + 510 -5703 1 1 0D 328 + 510 207 00010000D 329 + 510 -5703 1 1 0D 330 + 510 208 00010000D 331 + 510 -5703 1 1 0D 332 + 510 209 00010000D 333 + 510 -5703 1 1 0D 334 + 510 210 00010000D 335 + 510 -5703 1 1 0D 336 + 510 211 00010000D 337 + 510 -5703 1 1 0D 338 + 510 212 00010000D 339 + 510 -5703 1 1 0D 340 + 510 213 00010000D 341 + 510 -5703 1 1 0D 342 + 510 214 00010000D 343 + 510 -5703 1 1 0D 344 + 510 215 00010000D 345 + 510 -5703 1 1 0D 346 + 510 216 00010000D 347 + 510 -5703 1 1 0D 348 + 510 217 00010000D 349 + 510 -5703 1 1 0D 350 + 510 218 00010000D 351 + 510 -5703 1 1 0D 352 + 510 219 00010000D 353 + 510 -5703 1 1 0D 354 + 510 220 00010000D 355 + 510 -5703 1 1 0D 356 + 510 221 00010000D 357 + 510 -5703 1 1 0D 358 + 510 222 00010000D 359 + 510 -5703 1 1 0D 360 + 510 223 00010000D 361 + 510 -5703 1 1 0D 362 + 510 224 00010000D 363 + 510 -5703 1 1 0D 364 + 510 225 00010000D 365 + 510 -5703 1 1 0D 366 + 510 226 00010000D 367 + 510 -5703 1 1 0D 368 + 510 227 00010000D 369 + 510 -5703 1 1 0D 370 + 510 228 00010000D 371 + 510 -5703 1 1 0D 372 + 510 229 00010000D 373 + 510 -5703 1 1 0D 374 + 510 230 00010000D 375 + 510 -5703 1 1 0D 376 + 510 231 00010000D 377 + 510 -5703 1 1 0D 378 + 510 232 00010000D 379 + 510 -5703 1 1 0D 380 + 510 233 00010000D 381 + 510 -5703 1 1 0D 382 + 510 234 00010000D 383 + 510 -5703 1 1 0D 384 + 510 235 00010000D 385 + 510 -5703 1 1 0D 386 + 510 236 00010000D 387 + 510 -5703 1 1 0D 388 + 510 237 00010000D 389 + 510 -5703 1 1 0D 390 + 510 238 00010000D 391 + 510 -5703 1 1 0D 392 + 510 239 00010000D 393 + 510 -5703 1 1 0D 394 + 510 240 00010000D 395 + 510 -5703 1 1 0D 396 + 510 241 00010000D 397 + 510 -5703 1 1 0D 398 + 510 242 00010000D 399 + 510 -5703 1 1 0D 400 + 510 243 00010000D 401 + 510 -5703 1 1 0D 402 + 510 244 00010000D 403 + 510 -5703 1 1 0D 404 + 510 245 00010000D 405 + 510 -5703 1 1 0D 406 + 510 246 00010000D 407 + 510 -5703 1 1 0D 408 + 510 247 00010000D 409 + 510 -5703 1 1 0D 410 + 510 248 00010000D 411 + 510 -5703 1 1 0D 412 + 510 249 00010000D 413 + 510 -5703 1 1 0D 414 + 510 250 00010000D 415 + 510 -5703 1 1 0D 416 + 510 251 00010000D 417 + 510 -5703 1 1 0D 418 + 510 252 00010000D 419 + 510 -5703 1 1 0D 420 + 510 253 00010000D 421 + 510 -5703 1 1 0D 422 + 510 254 00010000D 423 + 510 -5703 1 1 0D 424 + 510 255 00010000D 425 + 510 -5703 1 1 0D 426 + 510 256 00010000D 427 + 510 -5703 1 1 0D 428 + 510 257 00010000D 429 + 510 -5703 1 1 0D 430 + 510 258 00010000D 431 + 510 -5703 1 1 0D 432 + 510 259 00010000D 433 + 510 -5703 1 1 0D 434 + 510 260 00010000D 435 + 510 -5703 1 1 0D 436 + 510 261 00010000D 437 + 510 -5703 1 1 0D 438 + 510 262 00010000D 439 + 510 -5703 1 1 0D 440 + 510 263 00010000D 441 + 510 -5703 1 1 0D 442 + 510 264 00010000D 443 + 510 -5703 1 1 0D 444 + 510 265 00010000D 445 + 510 -5703 1 1 0D 446 + 510 266 00010000D 447 + 510 -5703 1 1 0D 448 + 510 267 00010000D 449 + 510 -5703 1 1 0D 450 + 510 268 00010000D 451 + 510 -5703 1 1 0D 452 + 510 269 00010000D 453 + 510 -5703 1 1 0D 454 + 510 270 00010000D 455 + 510 -5703 1 1 0D 456 + 510 271 00010000D 457 + 510 -5703 1 1 0D 458 + 510 272 00010000D 459 + 510 -5703 1 1 0D 460 + 510 273 00010000D 461 + 510 -5703 1 1 0D 462 + 510 274 00010000D 463 + 510 -5703 1 1 0D 464 + 510 275 00010000D 465 + 510 -5703 1 1 0D 466 + 510 276 00010000D 467 + 510 -5703 1 1 0D 468 + 510 277 00010000D 469 + 510 -5703 1 1 0D 470 + 510 278 00010000D 471 + 510 -5703 1 1 0D 472 + 510 279 00010000D 473 + 510 -5703 1 1 0D 474 + 510 280 00010000D 475 + 510 -5703 1 1 0D 476 + 510 281 00010000D 477 + 510 -5703 1 1 0D 478 + 510 282 00010000D 479 + 510 -5703 1 1 0D 480 + 510 283 00010000D 481 + 510 -5703 1 1 0D 482 + 510 284 00010000D 483 + 510 -5703 1 1 0D 484 + 510 285 00010000D 485 + 510 -5703 1 1 0D 486 + 510 286 00010000D 487 + 510 -5703 1 1 0D 488 + 510 287 00010000D 489 + 510 -5703 1 1 0D 490 + 510 288 00010000D 491 + 510 -5703 1 1 0D 492 + 510 289 00010000D 493 + 510 -5703 1 1 0D 494 + 510 290 00010000D 495 + 510 -5703 1 1 0D 496 + 510 291 00010000D 497 + 510 -5703 1 1 0D 498 + 510 292 00010000D 499 + 510 -5703 1 1 0D 500 + 510 293 00010000D 501 + 510 -5703 1 1 0D 502 + 510 294 00010000D 503 + 510 -5703 1 1 0D 504 + 510 295 00010000D 505 + 510 -5703 1 1 0D 506 + 510 296 00010000D 507 + 510 -5703 1 1 0D 508 + 510 297 00010000D 509 + 510 -5703 1 1 0D 510 + 510 298 00010000D 511 + 510 -5703 1 1 0D 512 + 510 299 00010000D 513 + 510 -5703 1 1 0D 514 + 510 300 00010000D 515 + 510 -5703 1 1 0D 516 + 51