-
-
Save nicolai86/0616146583fd856524920c82fa84a101 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kepler1229b@qmk_firmware [master*] # diff -bur keyboards/clueboard/60/ keyboards/crkbdstm/rev1/ | |
Only in keyboards/clueboard/60/: .DS_Store | |
Only in keyboards/clueboard/60/: 60.c | |
Only in keyboards/clueboard/60/: 60.h | |
diff -bur keyboards/clueboard/60/config.h keyboards/crkbdstm/rev1/config.h | |
--- keyboards/clueboard/60/config.h 2019-01-26 16:22:39.000000000 -0800 | |
+++ keyboards/crkbdstm/rev1/config.h 2019-02-28 13:52:46.000000000 -0800 | |
@@ -1,126 +1,19 @@ | |
-/* | |
- * Copyright 2017 skully <[email protected]> | |
- * | |
- * 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 <http://www.gnu.org/licenses/>. | |
- */ | |
- | |
#pragma once | |
#include "config_common.h" | |
-/* USB Device descriptor parameter */ | |
-#define VENDOR_ID 0xC1ED | |
-#define PRODUCT_ID 0x2350 | |
+#define VENDOR_ID 0xFEED | |
+#define PRODUCT_ID 0x3066 | |
#define DEVICE_VER 0x0001 | |
-#define MANUFACTURER Clueboard | |
-#define PRODUCT Clueboard 60% | |
-#define DESCRIPTION Clueboard 60% | |
+#define MANUFACTURER nicolai86 | |
+#define PRODUCT Crkbd-stm | |
+#define DESCRIPTION A split keyboard based on the crkbd with 4x6 keys | |
-/* Address for jumping to bootloader on STM32 chips. */ | |
-/* It is chip dependent, the correct number can be looked up here: | |
- * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf | |
- */ | |
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 | |
-/* key matrix size */ | |
-#define MATRIX_ROWS 5 | |
-#define MATRIX_COLS 15 | |
- | |
-/* | |
- * Keyboard Matrix Assignments | |
- * | |
- * COLS: Pins used for columns, left to right | |
- * ROWS: Pins used for rows, top to bottom | |
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |
- * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |
- * | |
-*/ | |
-#define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } | |
-#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } | |
+#define MATRIX_ROWS 4 | |
+#define MATRIX_COLS 6 | |
+#define MATRIX_ROW_PINS { B1, B2, B10, B11 } | |
+#define MATRIX_COL_PINS { A14, A15, B3, B4, B5, B7 } | |
#define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 } | |
#define DIODE_DIRECTION COL2ROW | |
- | |
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |
-#define DEBOUNCE 6 | |
- | |
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |
-//#define LOCKING_SUPPORT_ENABLE | |
-/* Locking resynchronize hack */ | |
-//#define LOCKING_RESYNC_ENABLE | |
- | |
-/* | |
- * Force NKRO | |
- * | |
- * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | |
- * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | |
- * makefile for this to work.) | |
- * | |
- * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | |
- * until the next keyboard reset. | |
- * | |
- * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | |
- * fully operational during normal computer usage. | |
- * | |
- * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | |
- * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | |
- * bootmagic, NKRO mode will always be enabled until it is toggled again during a | |
- * power-up. | |
- * | |
- */ | |
-//#define FORCE_NKRO | |
- | |
-/* | |
- * Feature disable options | |
- * These options are also useful to firmware size reduction. | |
- */ | |
- | |
-/* disable debug print */ | |
-//#define NO_DEBUG | |
- | |
-/* disable print */ | |
-//#define NO_PRINT | |
- | |
-/* disable action features */ | |
-//#define NO_ACTION_LAYER | |
-//#define NO_ACTION_TAPPING | |
-//#define NO_ACTION_ONESHOT | |
-//#define NO_ACTION_MACRO | |
-//#define NO_ACTION_FUNCTION | |
- | |
-/* | |
- * MIDI options | |
- */ | |
- | |
-/* Prevent use of disabled MIDI features in the keymap */ | |
-//#define MIDI_ENABLE_STRICT 1 | |
- | |
-/* enable basic MIDI features: | |
- - MIDI notes can be sent when in Music mode is on | |
-*/ | |
-//#define MIDI_BASIC | |
- | |
-/* enable advanced MIDI features: | |
- - MIDI notes can be added to the keymap | |
- - Octave shift and transpose | |
- - Virtual sustain, portamento, and modulation wheel | |
- - etc. | |
-*/ | |
-//#define MIDI_ADVANCED | |
- | |
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | |
-//#define MIDI_TONE_KEYCODE_OCTAVES 1 | |
- | |
- /* Backlight configuration | |
- */ | |
-#define BACKLIGHT_LEVELS 1 | |
Only in keyboards/clueboard/60/: info.json | |
diff -bur keyboards/clueboard/60/keymaps/default/keymap.c keyboards/crkbdstm/rev1/keymaps/default/keymap.c | |
--- keyboards/clueboard/60/keymaps/default/keymap.c 2019-01-26 16:22:39.000000000 -0800 | |
+++ keyboards/crkbdstm/rev1/keymaps/default/keymap.c 2019-02-23 21:23:20.000000000 -0800 | |
@@ -1,125 +1,14 @@ | |
#include QMK_KEYBOARD_H | |
-enum keyboard_layers { | |
- _BL, | |
- _FL, | |
- _CL | |
-}; | |
- | |
enum custom_keycodes { | |
- S_BSKTC = SAFE_RANGE, | |
- S_ODEJY, | |
- S_RCKBY, | |
- S_DOEDR, | |
- S_SCALE, | |
- S_ONEUP, | |
- S_COIN, | |
- S_SONIC, | |
- S_ZELDA | |
+ QWERTY = SAFE_RANGE | |
}; | |
-#ifdef AUDIO_ENABLE | |
- float song_basketcase[][2] = SONG(BASKET_CASE); | |
- float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); | |
- float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); | |
- float song_doe_a_deer[][2] = SONG(DOE_A_DEER); | |
- float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); | |
- float song_coin[][2] = SONG(COIN_SOUND); | |
- float song_one_up[][2] = SONG(ONE_UP_SOUND); | |
- float song_sonic_ring[][2] = SONG(SONIC_RING); | |
- float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); | |
-#endif | |
- | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
- /* Layer 0: Default Layer | |
- * ,-----------------------------------------------------------. | |
- * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| | |
- * |-----------------------------------------------------------| | |
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | |
- * |-----------------------------------------------------------| | |
- * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | | |
- * |-----------------------------------------------------------| | |
- * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| | |
- * |-----------------------------------------------------------' | |
- * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | | |
- * `-----------------------------------------------------------' | |
- */ | |
- [_BL] = LAYOUT_all( | |
- KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC,\ | |
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ | |
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, \ | |
- KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, \ | |
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), | |
- [_FL] = LAYOUT_all( | |
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,\ | |
- _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ | |
- _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ | |
- _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ | |
- _______,_______,_______, _______, _______, _______, MO(_FL), _______), | |
- [_CL] = LAYOUT_all( | |
- BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ | |
- _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ | |
- _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ | |
- _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ | |
- _______, _______, _______, _______, _______, _______, MO(_FL), _______) | |
+ [QWERTY] = LAYOUT_all( \ | |
+ 1, 2, 3, 3, 4, 5, \ | |
+ 6, 7, 8, 9, 0, 1, \ | |
+ 2, 3, 4, 5, 6, 7, \ | |
+ 8, 9, 0, 1, 2, 3 \ | |
+ ) | |
}; | |
- | |
-bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
- switch (keycode) { | |
- case S_BSKTC: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_basketcase); | |
- } | |
- return false; | |
- case S_ODEJY: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_ode_to_joy); | |
- } | |
- return false; | |
- case S_RCKBY: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_rock_a_bye_baby); | |
- } | |
- return false; | |
- case S_DOEDR: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_doe_a_deer); | |
- } | |
- return false; | |
- case S_SCALE: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_scale); | |
- } | |
- return false; | |
- case S_ONEUP: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_one_up); | |
- } | |
- return false; | |
- case S_COIN: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_coin); | |
- } | |
- return false; | |
- case S_SONIC: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_sonic_ring); | |
- } | |
- return false; | |
- case S_ZELDA: | |
- if (record->event.pressed) { | |
- stop_all_notes(); | |
- PLAY_SONG(song_zelda_puzzle); | |
- } | |
- return false; | |
- } | |
- return true; | |
-} | |
Only in keyboards/clueboard/60/keymaps/default: readme.md | |
Only in keyboards/clueboard/60/keymaps: default_aek | |
Only in keyboards/clueboard/60/keymaps: yanfali | |
diff -bur keyboards/clueboard/60/led.c keyboards/crkbdstm/rev1/led.c | |
--- keyboards/clueboard/60/led.c 2018-10-13 15:01:25.000000000 -0700 | |
+++ keyboards/crkbdstm/rev1/led.c 2019-02-23 21:19:59.000000000 -0800 | |
@@ -1,53 +1,4 @@ | |
-/* | |
- * Copyright 2017 skully <[email protected]> | |
- * | |
- * 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 <http://www.gnu.org/licenses/>. | |
-*/ | |
- | |
#include "hal.h" | |
#include "backlight.h" | |
#include "led.h" | |
#include "printf.h" | |
- | |
-void backlight_init_ports(void) { | |
- printf("backlight_init_ports()\n"); | |
- #ifdef BACKLIGHT_ENABLE | |
- palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); | |
- palSetPad(GPIOB, 8); | |
- #endif | |
-} | |
- | |
-void backlight_set(uint8_t level) { | |
- printf("backlight_set(%d)\n", level); | |
- #ifdef BACKLIGHT_ENABLE | |
- if (level == 0) { | |
- // Turn backlight off | |
- palSetPad(GPIOB, 8); | |
- } else { | |
- // Turn backlight on | |
- palClearPad(GPIOB, 8); | |
- } | |
- #endif | |
-} | |
- | |
-void led_set_kb(uint8_t usb_led) { | |
- printf("led_set_kb(%d)\n", usb_led); | |
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | |
- // Turn capslock on | |
- palSetPad(GPIOB, 7); | |
- } else { | |
- // Turn capslock off | |
- palClearPad(GPIOB, 7); | |
- } | |
-} | |
Only in keyboards/clueboard/60/: readme.md | |
Only in keyboards/crkbdstm/rev1/: rev1.c | |
Only in keyboards/crkbdstm/rev1/: rev1.h | |
diff -bur keyboards/clueboard/60/rules.mk keyboards/crkbdstm/rev1/rules.mk | |
--- keyboards/clueboard/60/rules.mk 2019-01-26 16:22:39.000000000 -0800 | |
+++ keyboards/crkbdstm/rev1/rules.mk 2019-02-28 13:51:29.000000000 -0800 | |
@@ -1,4 +1,3 @@ | |
-# project specific files | |
SRC = led.c | |
LAYOUTS += 60_ansi 60_ansi_split_bs_rshift 60_iso | |
@@ -46,4 +45,4 @@ | |
CONSOLE_ENABLE = yes # Console for debug | |
COMMAND_ENABLE = no # Commands for debug and configuration | |
NKRO_ENABLE = yes # USB Nkey Rollover | |
-AUDIO_ENABLE = yes | |
+AUDIO_ENABLE = no | |
kepler1229b@qmk_firmware [master*] # ^C | |
kepler1229b@qmk_firmware [master*] # git diff keyboards/clueboard/60/60.c keyboards/crkbdstm/rev1/rev1.c | |
kepler1229b@qmk_firmware [master*] # git diff keyboards/clueboard/60/60.h keyboards/crkbdstm/rev1/rev1.h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment