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

Sejin EAT-1010R2 keyboard #19809

Merged
merged 10 commits into from
Mar 6, 2023
27 changes: 27 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
Copyright 2023 DmNosachev

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"
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved

/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 16

DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
#define BOOTMAGIC_LITE_ROW 1
#define BOOTMAGIC_LITE_COLUMN 0
27 changes: 27 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* Copyright 2020 QMK
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
*
* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/z150/halconf.h -r platforms/chibios/common/configs/halconf.h`
*/

#pragma once

#define HAL_USE_PWM TRUE

#include_next <halconf.h>

44 changes: 44 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"keyboard_name": "EAT-1010R2",
"manufacturer": "Sejin",
"url": "",
"maintainer": "DmNosachev",
"usb": {
"vid": "0x515A",
"pid": "0x4D4D",
"device_version": "0.0.1"
},
"diode_direction": "COL2ROW",
"development_board": "bluepill",
"matrix_pins": {
"cols": ["B9", "B8", "B7", "B6", "B5", "B4", "B3", "A15", "C13", "C14", "C15", "A0", "A1", "A2", "A3", "A4"],
"rows": ["B11", "B12", "B13", "B14", "B15", "A8", "A9", "A10"],
"ghost": true
},
"indicators": {
"caps_lock": "B1",
"num_lock": "B0",
"scroll_lock": "B10"
},
"features": {
"audio": false,
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"midi": false,
"mousekey": true,
"nkro": false,
"rgblight": false,
"unicode": false,
"bluetooth": false,
"backlight": false,
"sleep_led": false
},
"debounce": 5,
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
"layouts": {
"LAYOUT": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"\u2190", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Enter", "x":13.5, "y":2.5, "w":1.5, "h":2}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}]
}
}
}
38 changes: 38 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/keymaps/debug/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Copyright 2023 DmNosachev
*
* 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] = {
/* Base */
[0] = LAYOUT_debug(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
)
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef CONSOLE_ENABLE
uprintf("row: %u, col: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed);
#endif
return true;
}
1 change: 1 addition & 0 deletions keyboards/handwired/sejin_eat1010r2/keymaps/debug/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONSOLE_ENABLE = yes # Console for debug
58 changes: 58 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* Copyright 2023 DmNosachev
*
* 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

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN1
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ,---------------------------------------------------------------------------------------------------------------------------------------.
* | Esc | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 | |PrnSc|ScrLk|Pause| |
* |---------------------------------------------------------------------------------------------------------------------------------------|
* | ~ ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Bsp | |Insrt|Home |PgUp | |NumLk| / | * | - |
* |---------------------------------------------------------------------------------------------------------------------------------------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | Del | End |PgDn | | 7 | 8 | 9 | + |
* |-------------------------------------------------------------------------------| | --------------------------------------| |
* | Caps | A | S | D | F | G | H | J | K | L | ;: | '" | Enter | | 4 | 5 | 6 | |
* |---------------------------------------------------------------------------------------------------------------------------------------|
* | Shift | Z | X | C | V | B | N | M | , | . | /? | Shift | | Up | | 1 | 2 | 3 |Enter|
* |-----------------------------------------------------------------------------------------|---------------------------------------| |
* | Ctrl | | Alt | Space | Alt | | Ctr | |Left |Down |Right| | 0 | . | |
* `---------------------------------------------------------------------------------------------------------------------------------------'
*/
[_BASE] = LAYOUT(
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_PSCR, KC_SCRL, KC_PAUS,
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_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
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_ENT, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
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_P4, KC_P5, KC_P6,
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_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
)
};

/*
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool led_update_user(led_t led_state) {
return true;
}
*/
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 31 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2020 QMK
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
*
* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/z150/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
*/

#pragma once

#include_next <mcuconf.h>

#undef STM32_PWM_USE_TIM4
#define STM32_PWM_USE_TIM4 TRUE

#undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 FALSE

43 changes: 43 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# QMK-based firmware for Sejin EAT-1010R2 keyboard

* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev)
* Hardware Supported: Sejin EAT-1010R2 (membrane keyboard, Sejin
Futaba-mount dome, Asian 101 ISO layout), Blue/Black Pill STM32F103 MCU
oard. Alternatevely you can use any MCU which is supported by QMK and
has 27 or more IO pins

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

qmk compile -kb handwired/sejin_eat1010r2 -km default
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved

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).

## Additional hardware
* 16 and 8 pin 2.54mm (0.1'') FPC connectors. They can be found at
Aliexpress for 2–3 USD for 10pcs. Two 8 pin connectors can be glued
together as a replacement for 16 pin.
* Three 5mm LEDs and current limiting resistors (150–300Ω, depending on
LED specs). This keyboard has exactly the same spacing between LEDs as
IBM Model M, so a corresponding PCB can be used after adding resistors.

## Membrane
Sejin EAT-1010R2 has 16x8 matrix. There are 16 and 8 pin flex connectors
from membrane sheets. Solder FPC connectors to devboard (numbering from
left to right, see *matrix_pins* in info.json file).

## Bootloader
Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader)
to Blue Pill board.

There are several ways to get into the bootloader:
* STM32duino bootloader waits for 3 seconds in DFU mode before jumping to application.
You just have to start the flashing process, then connect the USB.
* This firmware is configured with [bootmagic feature](https://docs.qmk.fm/#/feature_bootmagic).
Hold the ESC key down when plugging the keyboard in to trigger the bootloader.

## Troubleshooting
There is *debug* layout which has mapping for every matrix position and
prints column and raw numbers to console (hid_listen or QMK toolbox).
2 changes: 2 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
39 changes: 39 additions & 0 deletions keyboards/handwired/sejin_eat1010r2/sejin_eat1010r2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* Copyright 2023 DmNosachev
DmNosachev marked this conversation as resolved.
Show resolved Hide resolved
*
* 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 "sejin_eat1010r2.h"

void matrix_init_kb(void) {
setPinOutput(LED_NUM_LOCK_PIN);
setPinOutput(LED_CAPS_LOCK_PIN);
setPinOutput(LED_SCROLL_LOCK_PIN);

writePinLow(LED_NUM_LOCK_PIN);
writePinLow(LED_CAPS_LOCK_PIN);
writePinLow(LED_SCROLL_LOCK_PIN);

matrix_init_user();
}

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(LED_NUM_LOCK_PIN, !led_state.num_lock);
writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
writePin(LED_SCROLL_LOCK_PIN, !led_state.scroll_lock);
}
return res;
}
Loading