Merge pull request #491 from keyboardio/hardware/splitography

Support for the SOFT/HRUF Splitography Steno Keyboard
pull/493/head
Jesse Vincent 6 years ago committed by GitHub
commit 70d769247f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,6 +90,7 @@ Kaleidoscope has been ported to the following devices:
- [Atreus](doc/plugin/Hardware-Technomancy-Atreus.md), post-2016 PCB variants with an A* MCU, and the handwired with Teensy from FalbaTech are supported, PCBs prior to 2016 and the legacy teensy2 variants are not. - [Atreus](doc/plugin/Hardware-Technomancy-Atreus.md), post-2016 PCB variants with an A* MCU, and the handwired with Teensy from FalbaTech are supported, PCBs prior to 2016 and the legacy teensy2 variants are not.
- [ErgoDox](doc/plugin/Hardware-EZ-ErgoDox.md): Originally developed to support the ErgoDox EZ, but all other compatible hardware is supported, such as the original ErgoDox and anything else wired like it, like some Dactyls. - [ErgoDox](doc/plugin/Hardware-EZ-ErgoDox.md): Originally developed to support the ErgoDox EZ, but all other compatible hardware is supported, such as the original ErgoDox and anything else wired like it, like some Dactyls.
- [Planck](doc/plugin/Hardware-OLKB-Planck.md): AVR-based Plancks, and anything else wired similarly should be supported, as long as they use a Teensy. - [Planck](doc/plugin/Hardware-OLKB-Planck.md): AVR-based Plancks, and anything else wired similarly should be supported, as long as they use a Teensy.
- [Splitography](doc/plugin/Hardware-SOFTHRUF-Splitography.md): Initial support for the Splitography Steno keyboard.
For more information, please see the hardware plugins' documentation. For more information, please see the hardware plugins' documentation.

@ -0,0 +1,5 @@
# Kaleidoscope-Hardware-SOFTHRUF-Splitography
Hardware support for the [SOFTHRUF Splitography][splitography] Steno keyboard.
[splitography]: https://softhruf.love/collections/writers

@ -0,0 +1,25 @@
flash_over_usb() {
sleep 1s
dfu-programmer ${MCU} erase
dfu-programmer ${MCU} flash "${HEX_FILE_PATH}"
dfu-programmer ${MCU} start
}
flash () {
prepare_to_flash
# This is defined in the (optional) user config.
# shellcheck disable=SC2154
${preFlash_HOOKS}
flash_over_usb || flash_over_usb
# This is defined in the (optional) user config.
# shellcheck disable=SC2154
${postFlash_HOOKS}
}
NO_RESET=1
DEFAULT_SKETCH="Splitography"
BOARD="splitography"

@ -0,0 +1,52 @@
# This stub makefile for a Kaleidoscope example pulls in all the targets
# required to build the example
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino
PACKAGE_DIR ?= $(HOME)/Library/Arduino15
else
SKETCHBOOK_DIR ?= $(HOME)/Arduino
PACKAGE_DIR ?= $(HOME)/.arduino15
endif
ARDUINO_INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr 2>/dev/null |head -n 1)
MANUALLY_INSTALLED_ENV=$(shell ls -dt $(SKETCHBOOK_DIR)/hardware/keyboardio/avr 2>/dev/null |head -n 1)
ifneq ("$(wildcard $(ARDUINO_INSTALLED_ENV)/boards.txt)","")
ifneq ("$(wildcard $(MANUALLY_INSTALLED_ENV)/boards.txt)","")
$(info ***************************************************************************)
$(info It appears that you have installed two copies of Kaleidoscope. One copy was)
$(info installed using Arduino's "Board Manager", while the other was installed by)
$(info hand, probably using "git".)
$(info )
$(info This will likely cause some trouble as you try to build keyboard firmware)
$(info using Kaleidoscope. You may want to remove either: )
$(info )
$(info $(PACKAGE_DIR)/packages/keyboardio/ which was installed using Arduino)
$(info )
$(info or)
$(info )
$(info $(SKETCHBOOK_DIR)/hardware/keyboardio/ which was installed by hand.)
$(info )
$(info ***************************************************************************)
$(info )
endif
BOARD_HARDWARE_PATH = $(ARDUINO_INSTALLED_ENV)
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= build-tools/makefiles/
KALEIDOSCOPE_BUILDER_DIR ?= $(ARDUINO_INSTALLED_ENV)/libraries/Kaleidoscope/bin/
endif
BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware
KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/
include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk

@ -0,0 +1,59 @@
/* -*- mode: c++ -*-
* Splitography -- A very basic Kaleidoscope example for the SOFT/HRUF Splitography keyboard
* Copyright (C) 2018 Keyboard.io, Inc
*
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "Kaleidoscope.h"
#include "Kaleidoscope-Steno.h"
enum {
_STENO,
};
/* *INDENT-OFF* */
KEYMAPS(
/* Steno (GeminiPR)
* ,-----------------------. ,-----------------------.
* | # | # | # | # | # | # | | # | # | # | # | # | # |
* |---+---+---+---+---+---| |---+---+---+---+---+---|
* | | S | T | P | H | * | | * | F | P | L | T | D |
* |---+---+---+---+---+---| |---+---+---+---+---+---|
* | | S | K | W | R | * | | * | R | B | G | S | Z |
* `-------------+---+---+-' `-+---+---+-------------'
* | A | O | | E | U |
* `-------' `-------'
*/
[_STENO] = KEYMAP(
S(N1) ,S(N2) ,S(N3) ,S(N4) ,S(N5) ,S(N6) ,S(N7) ,S(N8) ,S(N9) ,S(NA) ,S(NB) ,S(NC)
,XXX ,S(S1) ,S(TL) ,S(PL) ,S(HL) ,S(ST1) ,S(ST3) ,S(FR) ,S(PR) ,S(LR) ,S(TR) ,S(DR)
,XXX ,S(S2) ,S(KL) ,S(WL) ,S(RL) ,S(ST2) ,S(ST4) ,S(RR) ,S(BR) ,S(GR) ,S(SR) ,S(ZR)
,S(A) ,S(O) ,S(E) ,S(U)
)
);
/* *INDENT-ON* */
KALEIDOSCOPE_INIT_PLUGINS(GeminiPR);
void setup() {
Serial.begin(9600);
Kaleidoscope.setup();
}
void loop() {
Kaleidoscope.loop();
}

@ -0,0 +1,22 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Hardware-SOFTHRUF-Splitography -- Splitography hardware support for Kaleidoscope
* Copyright (C) 2018 Keyboard.io, Inc
*
* 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 3 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/>.
*/
#pragma once
#define KALEIDOSCOPE_WITH_ATMEGA_KEYBOARD 1
#include "kaleidoscope/hardware/softhruf/Splitography.h"

@ -0,0 +1,44 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Hardware-SOFTHRUF-Splitography -- Splitography hardware support for Kaleidoscope
* Copyright (C) 2018 Keyboard.io, Inc
*
* Based on QMK (commit e9a67f8fd) and sdothum's fork (commit 8616b44)
* (C) Jack Humbert, Jun Wako, Steven Hum, and others
* Original QMK sources:
* - keyboards/splitography/config.h
* - keyboards/splitography/splitography.h
*
* 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 3 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/>.
*/
#ifdef ARDUINO_AVR_SPLITOGRAPHY
#include <Kaleidoscope.h>
#include <avr/wdt.h>
namespace kaleidoscope {
namespace hardware {
namespace softhruf {
ATMEGA_KEYBOARD_DATA(Splitography);
constexpr int8_t Splitography::led_count;
}
}
}
HARDWARE_IMPLEMENTATION KeyboardHardware;
kaleidoscope::hardware::softhruf::Splitography &Splitography = KeyboardHardware;
#endif

@ -0,0 +1,113 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Hardware-SOFTHRUF-Splitography -- Splitography hardware support for Kaleidoscope
* Copyright (C) 2018 Keyboard.io, Inc
*
* Based on QMK (commit e9a67f8fd) and sdothum's fork (commit 8616b44)
* (C) Jack Humbert, Jun Wako, Steven Hum, and others
* Original QMK sources:
* - keyboards/splitography/config.h
* - keyboards/splitography/splitography.h
*
* 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 3 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/>.
*/
#pragma once
#ifdef ARDUINO_AVR_SPLITOGRAPHY
#include <Arduino.h>
#define HARDWARE_IMPLEMENTATION kaleidoscope::hardware::softhruf::Splitography
#include "Kaleidoscope-HIDAdaptor-KeyboardioHID.h"
#include "kaleidoscope/macro_helpers.h"
#include "kaleidoscope/hardware/avr/pins_and_ports.h"
#include "kaleidoscope/hardware/ATMegaKeyboard.h"
namespace kaleidoscope {
namespace hardware {
namespace softhruf {
class Splitography: public kaleidoscope::hardware::ATMegaKeyboard {
public:
Splitography(void) {
/* These two lines here are the result of many hours spent chasing ghosts.
* These are great lines, and we love them dearly, for they make a set of
* pins that would otherwise be reserved for JTAG accessible from the
* firmware.
*
* Most AVR chips that get put into keyboards have the JTAG port disabled in
* fuses, but some do not. When they're used for JTAG, then no matter what
* we do in the firmware, they will not be affected. So in case JTAG is not
* disabled in fuses, we want to do that in the firmware. Luckily for us,
* that's doable, we just have to write the JTD bit into MCUCR twice within
* four cycles. These two lines do just that.
*
* For more information, see the ATM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