2019-07-13 02:11:36 +02:00
|
|
|
import board
|
|
|
|
|
Continue to shuffle and burn stuff
- Remove the concept of "mcus". With only one target platform
(CircuitPython), it no longer makes a bunch of sense and has been kept
around for "what if" reasons, complicating our import chains and eating
up RAM for pointless subclasses. If you're a `board`, you derive from
`KeyboardConfig`. If you're a handwire, the user will derive from
`KeyboardConfig`. The end. As part of this, `kmk.hid` was refactored
heavily to emphasize that CircuitPython is our only supported HID stack,
with stubs for future HID implementations (`USB_HID` becomes
`AbstractHID`, probably only usable for testing purposes,
`CircuitPython_USB_HID` becomes `USBHID`, and `BLEHID` is added with an
immediate `NotImplementedError` on instantiation)
- `KeyboardConfig` can now take a HID type at runtime. The NRF52840
boards will happily run in either configuration once CircuitPython
support is in place, and a completely separate `mcu` subclass for each
mode made no sense. This also potentially allows runtime *swaps* of HID
driver down the line, but no code has been added to this effect. The
default, and only functional value, for this is `HIDModes.USB`
- Most consts have been moved to more logical homes - often, the main
or, often only, component that uses them. `DiodeOrientation` moved to
`kmk.matrix`, and anything HID-related moved to `kmk.hid`
2019-07-25 09:58:23 +02:00
|
|
|
from kmk.matrix import DiodeOrientation
|
|
|
|
from kmk.keyboard_config import KeyboardConfig as _KeyboardConfig
|
2019-07-13 02:11:36 +02:00
|
|
|
|
|
|
|
|
2019-07-20 23:53:30 +02:00
|
|
|
class KeyboardConfig(_KeyboardConfig):
|
2019-07-25 09:32:20 +02:00
|
|
|
col_pins = (board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
|
|
|
row_pins = (board.D13, board.D11, board.D10, board.D9)
|
2019-07-13 02:11:36 +02:00
|
|
|
diode_orientation = DiodeOrientation.COLUMNS
|
|
|
|
|
|
|
|
split_type = 'UART'
|
|
|
|
split_flip = True
|
|
|
|
split_offsets = [6, 6, 6, 6, 6]
|
|
|
|
uart_pin = board.SCL
|
|
|
|
extra_data_pin = board.SDA
|
|
|
|
rgb_pixel_pin = board.TX
|
|
|
|
# led_pin = board.D7
|