Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add större keyboard #22959

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0ac27d5
Add Större keyboard
mohoyt Jan 25, 2024
fe6f784
Readme updated
mohoyt Jan 25, 2024
6881a52
Update keyboards/sthlmkb/storre/info.json
mohoyt Jan 25, 2024
582f97a
Update keyboards/sthlmkb/storre/readme.md
mohoyt Jan 25, 2024
de2be95
Update keyboards/sthlmkb/storre/keymaps/default/keymap.c
mohoyt Jan 25, 2024
59417f8
Update keyboards/sthlmkb/storre/readme.md
mohoyt Jan 26, 2024
027bfb6
Update keyboards/sthlmkb/storre/rules.mk
mohoyt Jan 26, 2024
6018ccb
Update keyboards/sthlmkb/storre/storre.c
mohoyt Jan 26, 2024
2176bdb
Update keyboards/sthlmkb/storre/info.json
mohoyt Jan 26, 2024
44b44fe
Update keyboards/sthlmkb/storre/info.json
mohoyt Jan 26, 2024
8376687
Update keyboards/sthlmkb/storre/info.json
mohoyt Jan 26, 2024
64d0472
Encoder map added to default keymap
mohoyt Jan 26, 2024
4427654
Update rules.mk
mohoyt Jan 31, 2024
1b33602
Update keyboards/sthlmkb/storre/readme.md
mohoyt Jan 31, 2024
9c1107a
rules.mk added to default keymap for encoder map
mohoyt Jan 31, 2024
b02e5ef
Update keyboards/sthlmkb/storre/rules.mk
mohoyt Jan 31, 2024
84501d4
Update readme.md
mohoyt Jan 31, 2024
f3a49bf
Update keyboards/sthlmkb/storre/matrix.c
mohoyt May 6, 2024
35752bf
Update keyboards/sthlmkb/storre/matrix.c
mohoyt May 6, 2024
a02afe1
Update keyboards/sthlmkb/storre/matrix.c
mohoyt May 6, 2024
e893ffc
Update keyboards/sthlmkb/storre/matrix.c
mohoyt May 6, 2024
1bab176
Rename info.json to storre.json
mohoyt Aug 22, 2024
9372b64
Rename storre.json to keyboard.json
mohoyt Aug 22, 2024
94cb0f5
Update keyboards/sthlmkb/storre/matrix.c
mohoyt Aug 25, 2024
7f24d37
Update keyboards/sthlmkb/storre/matrix.c
mohoyt Aug 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions keyboards/sthlmkb/storre/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright 2024 mohoyt

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


/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 16
#define MATRIX_MUX_COLS 4

#define MATRIX_ROW_PINS { D2, B6, B2, B3, B1, F7 }
zvecr marked this conversation as resolved.
Show resolved Hide resolved
#define MATRIX_COL_PINS { }
#define MATRIX_COL_MUX_PINS { D7, E6, B4, B5 }

509 changes: 509 additions & 0 deletions keyboards/sthlmkb/storre/info.json
mohoyt marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions keyboards/sthlmkb/storre/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright 2024 mohoyt
*
* 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 QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_base(
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, KC_F13,
KC_GRV, 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_BSPC, KC_HOME,
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_END, KC_MPLY,
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_ENT, KC_PGUP,KC_MUTE,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ),

[1] = LAYOUT_base(
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, KC_F13,
KC_GRV, 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_BSPC, KC_HOME,
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_END, KC_MPLY,
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_ENT, KC_PGUP,KC_MUTE,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT )
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
};
95 changes: 95 additions & 0 deletions keyboards/sthlmkb/storre/matrix.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/* Copyright 2024 mohoyt
*
* 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 "quantum.h"
mohoyt marked this conversation as resolved.
Show resolved Hide resolved

#define COL_SHIFTER ((uint32_t)1)

// Column pins
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const uint8_t col_pins[MATRIX_MUX_COLS] = MATRIX_COL_MUX_PINS;

// Internal functions

static void init_pins(void) {
// Set cols to outputs, low
for (uint8_t pin = 0; pin < MATRIX_MUX_COLS; pin++) {
setPinOutput(col_pins[pin]);
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
}

// Unselect cols
for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) {
writePinLow(col_pins[bit]);
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
}

// Set rows to input, pullup
for (uint8_t pin = 0; pin < MATRIX_ROWS; pin++) {
setPinInputHigh(row_pins[pin]);
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
}
}

static void select_col(uint8_t col)
{
for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) {
uint8_t state = (col & (0b1 << bit)) >> bit;
writePin(col_pins[bit], state);
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
}
}

static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
{
bool matrix_changed = false;
select_col(current_col);
wait_us(5);

// Read each row sequentially
for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
{
matrix_row_t last_row_value = current_matrix[row_index];

if (!readPin(row_pins[row_index]))
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
{
current_matrix[row_index] |= (COL_SHIFTER << current_col);
}
else
{
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
}

if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
{
matrix_changed = true;
}
}

return matrix_changed;
}

// Matrix scan functions

void matrix_init_custom(void) {
init_pins();
}

bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool changed = false;

//Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
changed |= read_rows_on_col(current_matrix, current_col);
}

return (uint8_t)changed;
}
15 changes: 15 additions & 0 deletions keyboards/sthlmkb/storre/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# storre

![Storre](https://i.imgur.com/xxb9p5y.jpeg)
mohoyt marked this conversation as resolved.
Show resolved Hide resolved

Större is an easy to build 75%ish keyboard using only through hole components. It uses a separate microcontroller (like the Pro Micro or Elite C) to enable flexibility in connectivity and to further simplify the soldering experience (no more tricksy USB ports).
mohoyt marked this conversation as resolved.
Show resolved Hide resolved

* Keyboard Maintainer: [mohoyt](https://github.com/mohoyt)
* Hardware Supported: större, Pro Micro, Elite-C, Puchi-C, Nice!Nano and more...
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
* Hardware Availability: [sthlm kb](https://sthlmkb.com)

Make example for this keyboard (after setting up your build environment):

make sthlmkb/storre:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions keyboards/sthlmkb/storre/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Build Options
# change yes to no to disable
#
CUSTOM_MATRIX = lite # Lite custom matrix
mohoyt marked this conversation as resolved.
Show resolved Hide resolved


# Project specific files
SRC += matrix.c
mohoyt marked this conversation as resolved.
Show resolved Hide resolved
36 changes: 36 additions & 0 deletions keyboards/sthlmkb/storre/storre.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2024 mohoyt
*
* 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 "quantum.h"

#ifdef ENCODER_ENABLE
drashna marked this conversation as resolved.
Show resolved Hide resolved
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) {
if (clockwise) {
tap_code(KC_MPRV);
} else {
tap_code(KC_MNXT);
}
} else if (index == 1) {
if (clockwise) {
tap_code_delay(KC_VOLD, 10);
} else {
tap_code_delay(KC_VOLU, 10);
}
}
return true;
}
#endif
mohoyt marked this conversation as resolved.
Show resolved Hide resolved