Skip to content

Commit

Permalink
Add printedpad keyboard (qmk#21202)
Browse files Browse the repository at this point in the history
Co-authored-by: jack <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
  • Loading branch information
3 people authored Oct 5, 2023
1 parent 2a8b3a8 commit 92873cc
Show file tree
Hide file tree
Showing 12 changed files with 1,688 additions and 0 deletions.
15 changes: 15 additions & 0 deletions keyboards/printedpad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define I2C_DRIVER I2CD1
#define I2C1_SCL_PAL_MODE 1
#define I2C1_SDA_PAL_MODE 1
#define I2C1_TIMINGR_PRESC 0x00U
#define I2C1_TIMINGR_SCLDEL 0x03U
#define I2C1_TIMINGR_SDADEL 0x01U
#define I2C1_TIMINGR_SCLH 0x03U
#define I2C1_TIMINGR_SCLL 0x09U

#define OLED_TIMEOUT 300000
8 changes: 8 additions & 0 deletions keyboards/printedpad/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define HAL_USE_I2C TRUE

#include_next <halconf.h>
46 changes: 46 additions & 0 deletions keyboards/printedpad/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"manufacturer": "Prota Designs",
"keyboard_name": "Printed Pad",
"maintainer": "noahbei",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"oled": true
},
"matrix_pins": {
"cols": ["B2", "B1", "B0"],
"rows": ["A10", "C9", "A8", "A9"]
},
"processor": "STM32F072",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0001",
"vid": "0x5044"
},
"layouts": {
"LAYOUT": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },

{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 },

{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 },

{ "matrix": [3, 0], "x": 0, "y": 3 },
{ "matrix": [3, 1], "x": 1, "y": 3 },
{ "matrix": [3, 2], "x": 2, "y": 3 }
]
}
}
}
45 changes: 45 additions & 0 deletions keyboards/printedpad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┐
* │Tog│
* ├───┼───┬───┐
* │ 7 │ 8 │ 9 │
* ├───┼───┼───┤
* │ 4 │ 5 │ 6 │
* ├───┼───┼───┤
* │ 1 │ 2 │ 3 │
* └───┴───┴───┘
*/
[0] = LAYOUT(
LT(0, KC_NO),
KC_7, KC_8, KC_9,
KC_4, KC_5, KC_6,
KC_1, KC_2, KC_3
),

[1] = LAYOUT(
LT(0, KC_NO),
KC_A, KC_B, KC_C,
KC_D, KC_E, KC_F,
KC_G, KC_H, KC_I
),

[2] = LAYOUT(
LT(0, KC_NO),
KC_J, KC_K, KC_L,
KC_M, KC_N, KC_O,
KC_P, KC_Q, KC_R
),

[3] = LAYOUT(
LT(0, KC_NO),
KC_S, KC_T, KC_U,
KC_V, KC_W, KC_X,
KC_Y, KC_Z, KC_ENT
)
};
45 changes: 45 additions & 0 deletions keyboards/printedpad/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┐
* │Tog│
* ├───┼───┬───┐
* │ 7 │ 8 │ 9 │
* ├───┼───┼───┤
* │ 4 │ 5 │ 6 │
* ├───┼───┼───┤
* │ 1 │ 2 │ 3 │
* └───┴───┴───┘
*/
[0] = LAYOUT(
LT(0, KC_NO),
KC_7, KC_8, KC_9,
KC_4, KC_5, KC_6,
KC_1, KC_2, KC_3
),

[1] = LAYOUT(
LT(0, KC_NO),
KC_A, KC_B, KC_C,
KC_D, KC_E, KC_F,
KC_G, KC_H, KC_I
),

[2] = LAYOUT(
LT(0, KC_NO),
KC_J, KC_K, KC_L,
KC_M, KC_N, KC_O,
KC_P, KC_Q, KC_R
),

[3] = LAYOUT(
LT(0, KC_NO),
KC_S, KC_T, KC_U,
KC_V, KC_W, KC_X,
KC_Y, KC_Z, KC_ENT
)
};
1 change: 1 addition & 0 deletions keyboards/printedpad/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
9 changes: 9 additions & 0 deletions keyboards/printedpad/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>

#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
Loading

0 comments on commit 92873cc

Please sign in to comment.