-
Notifications
You must be signed in to change notification settings - Fork 489
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
Splitkb kyria rev2 port #852
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard | ||
from kmk.quickpin.pro_micro.sparkfun_promicro_rp2040 import pinout as pins | ||
from kmk.scanners import DiodeOrientation | ||
from kmk.scanners import intify_coordinate as ic | ||
from storage import getmount | ||
|
||
isLeftSide = False if str(getmount('/').label)[-1] == 'R' else True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only works if the split sides were set up to use the mountpoint name to determine left and right. |
||
leftColPins = ( | ||
pins[6], | ||
pins[7], | ||
pins[8], | ||
pins[9], | ||
pins[10], | ||
pins[11], | ||
pins[12], | ||
pins[13], | ||
) | ||
leftRowPins = (pins[17], pins[16], pins[15], pins[14]) | ||
|
||
rightColPins = ( | ||
pins[10], | ||
pins[11], | ||
pins[12], | ||
pins[13], | ||
pins[14], | ||
pins[15], | ||
pins[16], | ||
pins[17], | ||
) | ||
rightRowPins = (pins[6], pins[7], pins[8], pins[9]) | ||
|
||
|
||
colPins = () | ||
rowPins = () | ||
|
||
if isLeftSide: | ||
colPins = leftColPins | ||
rowPins = leftRowPins | ||
else: | ||
colPins = rightColPins | ||
rowPins = rightRowPins | ||
|
||
|
||
class KMKKeyboard(_KMKKeyboard): | ||
SDA = pins[4] | ||
SCL = pins[5] | ||
col_pins = ( | ||
pins[6], | ||
pins[7], | ||
pins[8], | ||
pins[9], | ||
pins[10], | ||
pins[11], | ||
pins[12], | ||
pins[13], | ||
) | ||
row_pins = (pins[17], pins[16], pins[15], pins[14]) | ||
diode_orientation = DiodeOrientation.COL2ROW | ||
data_pin = pins[1] | ||
rgb_pixel_pin = pins[0] | ||
Comment on lines
+59
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These members are legacy only and should not be used in new contributions. These pins are to be provided to the split and rgb modules directly. |
||
|
||
coord_mapping = [ | ||
0, 1, 2, 3, 4, 5, 34, 35, 36, 37, 38, 39, | ||
8, 9, 10, 11, 12, 13, 42, 43, 44, 45, 46, 47, | ||
16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55, | ||
26, 28, 29, 30, 31, 56, 57, 58, 59, 61 | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused; remove this line.