kmk_firmware/boards/lily58/kb.py

38 lines
934 B
Python
Raw Normal View History

2020-09-29 01:07:19 +02:00
import board
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
2022-04-09 02:09:24 +02:00
from kmk.scanners import DiodeOrientation
2020-09-29 01:07:19 +02:00
2020-09-29 01:07:19 +02:00
class KMKKeyboard(_KMKKeyboard):
col_pins = (
2022-10-09 17:44:45 +02:00
board.pins[17],
board.pins[16],
board.pins[15],
board.pins[14],
board.pins[13],
board.pins[12],
)
row_pins = (
board.pins[7],
board.pins[8],
board.pins[9],
board.pins[10],
board.pins[11],
)
2020-09-29 01:07:19 +02:00
diode_orientation = DiodeOrientation.COLUMNS
2022-10-09 17:44:45 +02:00
uart_pin = board.pins[1]
rgb_pixel_pin = pins[0]
data_pin = board.pins[1]
i2c = board.I2C
2020-09-29 01:07:19 +02:00
# flake8: noqa
2022-10-09 17:44:45 +02:00
# fmt: off
coord_mapping = [
0, 1, 2, 3, 4, 5, 36, 35, 34, 33, 32, 31,
6, 7, 8, 9, 10, 11, 42, 41, 40, 39, 38, 37,
12, 13, 14, 15, 16, 17, 48, 47, 46, 45, 44, 43,
18, 19, 20, 21, 22, 23, 54, 53, 52, 51, 50, 49,
26, 27, 28, 29, 30, 60, 59, 58, 57, 56,
]