From 87c360716ac6976fc74335545e88e536b932fedb Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 6 Jun 2022 14:18:18 +0200 Subject: [PATCH] OG Atreus: Replace the example firmware with a Chrysalis-enabled one Replace the example sketch in `examples/` with a Chrysalis-enabled one in the plugin directory. The sketch used is the default Technomancy Atreus sketch from: keyboardio/Chrysalis-Firmware-Bundle@2dc27f9936787d2747797c0d4962e02cadf92724 Signed-off-by: Gergely Nagy --- .../FactoryFirmware/FactoryFirmware.ino | 89 +++++++++++-------- .../examples/FactoryFirmware}/Makefile | 0 .../examples/FactoryFirmware}/sketch.json | 0 3 files changed, 54 insertions(+), 35 deletions(-) rename examples/Devices/Technomancy/Atreus/Atreus.ino => plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/FactoryFirmware.ino (53%) rename {examples/Devices/Technomancy/Atreus => plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware}/Makefile (100%) rename {examples/Devices/Technomancy/Atreus => plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware}/sketch.json (100%) diff --git a/examples/Devices/Technomancy/Atreus/Atreus.ino b/plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/FactoryFirmware.ino similarity index 53% rename from examples/Devices/Technomancy/Atreus/Atreus.ino rename to plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/FactoryFirmware.ino index 51c302b5..42c61893 100644 --- a/examples/Devices/Technomancy/Atreus/Atreus.ino +++ b/plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/FactoryFirmware.ino @@ -1,6 +1,6 @@ /* -*- mode: c++ -*- - * Atreus -- A very basic Kaleidoscope example for the Atreus - * Copyright (C) 2018 Keyboard.io, Inc + * Atreus -- Chrysalis-enabled Sketch for Technomancy's Atreus (minimal) + * Copyright (C) 2018, 2019, 2020 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 @@ -18,75 +18,92 @@ */ #include "Kaleidoscope.h" +#include "Kaleidoscope-EEPROM-Settings.h" +#include "Kaleidoscope-EEPROM-Keymap.h" +#include "Kaleidoscope-FocusSerial.h" #include "Kaleidoscope-Macros.h" #define MO(n) ShiftToLayer(n) #define TG(n) LockLayer(n) enum { - QWERTY, - FUN, - UPPER + RESET, + QW }; #define Key_Exclamation LSHIFT(Key_1) -#define Key_At LSHIFT(Key_2) -#define Key_Hash LSHIFT(Key_3) -#define Key_Dollar LSHIFT(Key_4) -#define Key_And LSHIFT(Key_7) -#define Key_Star LSHIFT(Key_8) -#define Key_Plus LSHIFT(Key_Equals) - -// clang-format off +#define Key_At LSHIFT(Key_2) +#define Key_Hash LSHIFT(Key_3) +#define Key_Dollar LSHIFT(Key_4) +#define Key_And LSHIFT(Key_7) +#define Key_Star LSHIFT(Key_8) +#define Key_Plus LSHIFT(Key_Equals) + +enum { + _QW, + _RS, + _LW +}; + +/* *INDENT-OFF* */ KEYMAPS( - [QWERTY] = KEYMAP_STACKED + [_QW] = KEYMAP_STACKED ( Key_Q ,Key_W ,Key_E ,Key_R ,Key_T ,Key_A ,Key_S ,Key_D ,Key_F ,Key_G ,Key_Z ,Key_X ,Key_C ,Key_V ,Key_B ,Key_Esc ,Key_Tab ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl - ,Key_Y ,Key_U ,Key_I ,Key_O ,Key_P - ,Key_H ,Key_J ,Key_K ,Key_L ,Key_Semicolon - ,Key_N ,Key_M ,Key_Comma ,Key_Period ,Key_Slash - ,Key_LeftAlt ,Key_Space ,MO(FUN) ,Key_Minus ,Key_Quote ,Key_Enter + ,Key_Y ,Key_U ,Key_I ,Key_O ,Key_P + ,Key_H ,Key_J ,Key_K ,Key_L ,Key_Semicolon + ,Key_N ,Key_M ,Key_Comma ,Key_Period ,Key_Slash + ,Key_LeftAlt ,Key_Space ,MO(_RS) ,Key_Minus ,Key_Quote ,Key_Enter ), - [FUN] = KEYMAP_STACKED + [_RS] = KEYMAP_STACKED ( Key_Exclamation ,Key_At ,Key_UpArrow ,Key_LeftCurlyBracket ,Key_RightCurlyBracket ,Key_Hash ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_Dollar ,Key_LeftBracket ,Key_RightBracket ,Key_LeftParen ,Key_RightParen ,Key_And - ,TG(UPPER) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl + ,TG(_LW) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl - ,Key_PageUp ,Key_7 ,Key_8 ,Key_9 ,Key_Star - ,Key_PageDown ,Key_4 ,Key_5 ,Key_6 ,Key_Plus - ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash - ,Key_LeftAlt ,Key_Space ,MO(FUN) ,Key_Period ,Key_0 ,Key_Equals + ,Key_PageUp ,Key_7 ,Key_8 ,Key_9 ,Key_Star + ,Key_PageDown ,Key_4 ,Key_5 ,Key_6 ,Key_Plus + ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash + ,Key_LeftAlt ,Key_Space ,___ ,Key_Period ,Key_0 ,Key_Equals ), - [UPPER] = KEYMAP_STACKED + [_LW] = KEYMAP_STACKED ( Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp ,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown - ,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ + ,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,M(RESET) ,XXX ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___ - ,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10 - ,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11 - ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12 - ,___ ,___ ,M(QWERTY),Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause + ,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10 + ,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11 + ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12 + ,___ ,___ ,M(QW) ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause ) ) -// clang-format on +/* *INDENT-ON* */ -KALEIDOSCOPE_INIT_PLUGINS(Macros); +KALEIDOSCOPE_INIT_PLUGINS( + EEPROMSettings, + EEPROMKeymap, + Focus, + FocusEEPROMCommand, + FocusSettingsCommand, + Macros +); const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) { switch (macro_id) { - case QWERTY: - if (keyToggledOn(event.state)) - Layer.move(QWERTY); + case RESET: + Kaleidoscope.rebootBootloader(); + break; + case QW: + Layer.move(_QW); break; default: break; @@ -97,6 +114,8 @@ const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) { void setup() { Kaleidoscope.setup(); + + EEPROMKeymap.setup(5); } void loop() { diff --git a/examples/Devices/Technomancy/Atreus/Makefile b/plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/Makefile similarity index 100% rename from examples/Devices/Technomancy/Atreus/Makefile rename to plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/Makefile diff --git a/examples/Devices/Technomancy/Atreus/sketch.json b/plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/sketch.json similarity index 100% rename from examples/Devices/Technomancy/Atreus/sketch.json rename to plugins/Kaleidoscope-Hardware-Technomancy-Atreus/examples/FactoryFirmware/sketch.json