Skip to content

V3 firmware #11

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

Merged
merged 6 commits into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions firmware/kmk/boot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import board
import digitalio
import storage

reset_pin = digitalio.DigitalInOut(board.GP28)
reset_pin.pull = digitalio.Pull.UP
if reset_pin.value:
storage.disable_usb_drive()
22 changes: 22 additions & 0 deletions firmware/kmk/kb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import board

from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.scanners import DiodeOrientation


class KMKKeyboard(_KMKKeyboard):
# fmt: off
row_pins = (board.GP14, board.GP13, board.GP12, board.GP11, board.GP10)
col_pins = (board.GP0, board.GP1, board.GP2, board.GP3, board.GP7, board.GP8, board.GP9)
# fmt: on
data_pin = board.GP15
diode_orientation = DiodeOrientation.COL2ROW
# fmt: off
coord_mapping = [
0, 1, 2, 3, 4, 5, 6, 35, 36, 37, 38, 39, 40, 41,
7, 8, 9, 10, 11, 12, 13, 42, 43, 44, 45, 46, 47, 48,
14, 15, 16, 17, 18, 19, 20, 49, 50, 51, 52, 53, 54, 55,
21, 22, 23, 24, 25, 26, 27, 56, 57, 58, 59, 60, 61, 62,
31, 32, 33, 34, 63, 64, 65, 66
]
# fmt: on
45 changes: 45 additions & 0 deletions firmware/kmk/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from kb import KMKKeyboard
from kmk.keys import KC
from kmk.modules.layers import Layers
from kmk.modules.split import Split, SplitType

print("Starting 11111 keyboard.")

keyboard = KMKKeyboard()

layers_ext = Layers()
split = Split(
split_type=SplitType.UART, split_flip=True, data_pin=keyboard.data_pin, use_pio=True
)
keyboard.modules = [layers_ext, split]

LOWER = KC.MO(1)
RAISE = KC.MO(2)
# fmt: off
keyboard.keymap = [
[
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.MINS, KC.EQL, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.GRV,
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.LBRC, KC.RBRC, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.BSLS, KC.SLSH, KC.H, KC.J, KC.K, KC.L, KC.SCLN, KC.QUOT,
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.LANG2, KC.LANG1, KC.N, KC.M, KC.COMM, KC.DOT, KC.HOME, KC.RSFT,
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT, KC.END,
],
[
KC.ESC, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F11, KC.F12, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.GRV,
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.LBRC, KC.RBRC, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.BSLS, KC.SLSH, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, KC.SCLN, KC.QUOT,
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.LANG2, KC.LANG1, KC.N, KC.M, KC.COMM, KC.DOT, KC.HOME, KC.RSFT,
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT, KC.END,
],
[
KC.ESC, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F11, KC.F12, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.GRV,
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.LBRC, KC.RBRC, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.DEL,
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.BSLS, KC.SLSH, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, KC.SCLN, KC.QUOT,
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.LANG2, KC.LANG1, KC.N, KC.M, KC.COMM, KC.DOT, KC.HOME, KC.RSFT,
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT, KC.END,
]
]

# fmt: on
if __name__ == '__main__':
keyboard.go()
7 changes: 7 additions & 0 deletions firmware/kmk/memo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Using KMK firmware

current working version:

- [Waveshare RP2040-zero](https://www.waveshare.com/wiki/RP2040-Zero)
- [CircuitPython 8.0.5](https://circuitpython.org/board/waveshare_rp2040_zero/)
- [KMK firmware b84cd0bdab5fce47534df7e6ccfbadb2e3288ba5](https://github.com/KMKfw/kmk_firmware/commit/b84cd0bdab5fce47534df7e6ccfbadb2e3288ba5)
29 changes: 0 additions & 29 deletions keymap/examples/keymap.rb

This file was deleted.

39 changes: 0 additions & 39 deletions keymap/keymap.rb

This file was deleted.