Compare commits

...

72 Commits

Author SHA1 Message Date
zvecr
929da00c2f Initial potentiometer support 2023-12-13 03:19:33 +00:00
QMK Bot
e2472ee8f1 Merge remote-tracking branch 'origin/master' into develop 2023-12-12 02:12:41 +00:00
Joel Challis
4682226e20 Keymap introspection for Dip Switches (#22543) 2023-12-11 23:06:18 +00:00
QMK Bot
d85f954d30 Merge remote-tracking branch 'origin/master' into develop 2023-12-11 09:07:58 +00:00
Joel Challis
42245651e7 Align Dip Switch feature (#22625) 2023-12-08 15:57:34 +00:00
QMK Bot
e471cb80cb Merge remote-tracking branch 'origin/master' into develop 2023-12-08 09:55:53 +00:00
Ryan
24511d31b6 LED/RGB Matrix: add header for drivers (#22628) 2023-12-08 16:54:47 +11:00
SmollChungus
2d3f2e92d8 consolidate firmware folder in smoll parent folder (#22401)
* consolidate firmware folder in smoll parent folder

* add moved keyboards to mapping

* typo fix

* typo..

* Update rules.mk

fix default folder lefty

* Update data/mappings/keyboard_aliases.hjson

Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>

---------

Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>
2023-12-08 04:36:38 +00:00
QMK Bot
e394c06d14 Merge remote-tracking branch 'origin/master' into develop 2023-12-08 03:44:02 +00:00
Cipulot
81cedf5fa5 Add ADC support STM32L4xx and STM32G4xx series MCUs (#22341)
* Update analog.c

* Changes to remove errors in compile

* Update analog.c

Fix for RP2040 build errors

* Revert "Merge branch 'adc-add-stm32l4xx-stm32g4xx' of https://github.com/Cipulot/qmk_firmware into adc-add-stm32l4xx-stm32g4xx"

This reverts commit b11c297078, reversing
changes made to ed3051f941.

* Update analog.c

Attempt fix for formatting CI error

* Update platforms/chibios/drivers/analog.c

Co-authored-by: Joel Challis <git@zvecr.com>

* Update platforms/chibios/drivers/analog.c

Co-authored-by: Joel Challis <git@zvecr.com>

* Update platforms/chibios/drivers/analog.c

Co-authored-by: Joel Challis <git@zvecr.com>

---------

Co-authored-by: Joel Challis <git@zvecr.com>
2023-12-08 01:26:44 +00:00
QMK Bot
fc61fd9ce3 Merge remote-tracking branch 'origin/master' into develop 2023-12-08 00:15:11 +00:00
QMK Bot
6f78b0daf0 Merge remote-tracking branch 'origin/master' into develop 2023-12-07 20:26:19 +00:00
QMK Bot
b4dba3cfb1 Merge remote-tracking branch 'origin/master' into develop 2023-12-06 17:40:28 +00:00
QMK Bot
53c262de1b Merge remote-tracking branch 'origin/master' into develop 2023-12-06 16:28:29 +00:00
David Hoelscher
18630b741e Add QP support for smaller OLED displays and SSD1306 (#22358) 2023-12-06 13:06:58 +00:00
QMK Bot
8ba46dcf61 Merge remote-tracking branch 'origin/master' into develop 2023-12-06 07:00:10 +00:00
QMK Bot
4e836dd6cf Merge remote-tracking branch 'origin/master' into develop 2023-12-06 04:56:04 +00:00
QMK Bot
51ce4ae8ad Merge remote-tracking branch 'origin/master' into develop 2023-12-06 03:52:28 +00:00
Ryan
b6fbed3dc3 LED drivers: change "TWI" to "I2C" (#22617) 2023-12-05 19:52:18 -08:00
QMK Bot
8b022cefc5 Merge remote-tracking branch 'origin/master' into develop 2023-12-06 03:35:11 +00:00
era
11aa512c85 [Keyboard] Remove era/klein (#22384)
* Remove era/klein

era/klein is replaced by sirind/era/klein_sd

* Add an entry to data/mappings/keyboard_aliases.hjson

Add an entry to data/mappings/keyboard_aliases.hjson
2023-12-05 15:57:07 -07:00
QMK Bot
1b56428e52 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 22:52:50 +00:00
QMK Bot
1ffb9092eb Merge remote-tracking branch 'origin/master' into develop 2023-12-05 19:06:44 +00:00
QMK Bot
c286ab90f9 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 15:41:35 +00:00
QMK Bot
ca2e424b75 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 13:32:43 +00:00
Ryan
17f36a21bf Rework RGBLight driver system (#22529) 2023-12-05 22:49:14 +11:00
Joel Challis
2acb426b8e Remove "empty" files (#22603) 2023-12-05 08:37:00 +00:00
QMK Bot
92cf493d7f Merge remote-tracking branch 'origin/master' into develop 2023-12-05 08:30:41 +00:00
QMK Bot
7317680904 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 08:29:41 +00:00
QMK Bot
3208f5fd1a Merge remote-tracking branch 'origin/master' into develop 2023-12-05 08:19:55 +00:00
QMK Bot
9e60a81263 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 07:43:42 +00:00
QMK Bot
05787bc381 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 07:15:25 +00:00
QMK Bot
158d99b738 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 05:56:48 +00:00
QMK Bot
18aa7d1244 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 05:19:46 +00:00
QMK Bot
6537794989 Merge remote-tracking branch 'origin/master' into develop 2023-12-05 03:54:11 +00:00
QMK Bot
99ab4393de Merge remote-tracking branch 'origin/master' into develop 2023-12-04 23:30:31 +00:00
QMK Bot
c9d57e9014 Merge remote-tracking branch 'origin/master' into develop 2023-12-04 18:56:04 +00:00
QMK Bot
8c4b0827ac Merge remote-tracking branch 'origin/master' into develop 2023-12-04 15:53:32 +00:00
zvecr
daa5afcf1d Merge remote-tracking branch 'origin/master' into develop 2023-12-04 13:58:34 +00:00
yiancar
7f67256047 Add EE-AT and move W1-AT under geonworks (#22526)
* Add EE-AT and move W1-AT under geonworks
Co-authored-by: yiancar <yiancar@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2023-12-04 09:07:37 +00:00
Ryan
358bc8eac8 LED drivers: refactor page selection (#22518) 2023-12-04 17:52:40 +11:00
QMK Bot
3a2aec47b7 Merge remote-tracking branch 'origin/master' into develop 2023-12-04 00:58:12 +00:00
Dasky
86f073a8ea Add basic presence check for cirque trackpad. (#22546) 2023-12-04 00:14:28 +00:00
JuanoD
ce81801480 Add latam spanish headers (#22542) 2023-12-04 00:13:27 +00:00
QMK Bot
57db82445e Merge remote-tracking branch 'origin/master' into develop 2023-12-03 01:27:23 +00:00
QMK Bot
ceb15bf5db Merge remote-tracking branch 'origin/master' into develop 2023-12-02 23:58:44 +00:00
QMK Bot
c7a58bf280 Merge remote-tracking branch 'origin/master' into develop 2023-12-02 22:47:08 +00:00
QMK Bot
b45b3aaec7 Merge remote-tracking branch 'origin/master' into develop 2023-12-02 21:51:04 +00:00
QMK Bot
07e2b645ab Merge remote-tracking branch 'origin/master' into develop 2023-12-01 14:06:15 +00:00
QMK Bot
4be3abc39e Merge remote-tracking branch 'origin/master' into develop 2023-12-01 12:08:20 +00:00
QMK Bot
e0e621ad6f Merge remote-tracking branch 'origin/master' into develop 2023-12-01 10:07:56 +00:00
Dalius Dobravolskas
cc3c3ace0c Feature: joystick weights (#21883)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-12-01 01:30:36 -08:00
QMK Bot
f2f99739b3 Merge remote-tracking branch 'origin/master' into develop 2023-12-01 09:04:25 +00:00
QMK Bot
9b0fc99076 Merge remote-tracking branch 'origin/master' into develop 2023-11-30 22:45:50 +00:00
QMK Bot
091310e75e Merge remote-tracking branch 'origin/master' into develop 2023-11-30 09:28:22 +00:00
Ryan
099eaefb40 Add APA102_LED_COUNT define (#22530) 2023-11-30 10:19:41 +11:00
Ryan
2886c335a0 keycapsss/plaid_pad: switch to encoder map (#22474) 2023-11-30 10:19:17 +11:00
Pete Neisen
7cc90c234f Converted RGB matrix to use last_input_activity_elapsed(). (#21687)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-11-30 09:38:06 +11:00
QMK Bot
cfbbb503a4 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 07:47:35 +00:00
QMK Bot
8d308d56e3 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 07:46:44 +00:00
Alin Marin Elena
e3d367df8a Add 5x13 and 6x13 ortho community layouts (#22315)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Alin Marin Elena <alin@elena.space>
2023-11-28 22:56:17 -08:00
Stefan Kerkmann
36ad597e15 lib: chibios-contrib: sync with chibios-21.11.x (#22560)
This contains commit from da78eb3759b8..9d7a7f904ed1:

    9d7a7f90 Merge pull request #382 from KarlK90/fix/rp2040-i2c-speeds
    70119934 Merge pull request #383 from
             KarlK90/fix/rp2040-usb-get-status-request
    1a1bbe6c rp2040: usb: fix usb_lld_get_status functions
    7d9212dd rp2040: i2c: fix speed calculation
    fb67e502 Merge pull request #377 from 1Conan/sn32_fix_registry
    e72939ef SN32: update registry
    5b4836ca Merge pull request #376 from dexter93/sn32_usb_v2
    5ded9de9 sn32: usb: do NOT clear interrupt status until handled
    Leftover Sonix reference code cleanup. Sometimes when there is
    traffic on more than 1 ep's packets would be dropped before they
    could be handled. Clearing the status flags after handling them
    takes care of it.
    e9a4a512 sn32: usb: only activate interrupts on lld start
    e4a35d1c sn32: fix host remote wakeup
2023-11-29 07:01:16 +01:00
QMK Bot
e923efcd56 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 03:33:32 +00:00
QMK Bot
a886d7e3dd Merge remote-tracking branch 'origin/master' into develop 2023-11-29 03:30:41 +00:00
QMK Bot
6524d5354a Merge remote-tracking branch 'origin/master' into develop 2023-11-29 02:49:27 +00:00
QMK Bot
e90874c382 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 02:46:47 +00:00
QMK Bot
6bba3c6578 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 02:24:16 +00:00
Less/Rikki
81d601b725 refactor: projectcain/vault35 (#22558) 2023-11-28 18:24:02 -08:00
QMK Bot
75a43ddf55 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 02:00:53 +00:00
QMK Bot
a2c745cae8 Merge remote-tracking branch 'origin/master' into develop 2023-11-28 14:07:50 +00:00
leah-splitkb
2450fe28ee Add Imera converter (#22419) 2023-11-28 17:53:47 +11:00
Nick Brassel
ea8d2ffe31 Branch point for 20231126 Breaking Change 2023-11-28 16:42:43 +11:00
309 changed files with 3052 additions and 3423 deletions

View File

@@ -313,6 +313,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
@@ -907,6 +908,16 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
endif
endif
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
ifeq ($(strip $(DIP_SWITCH_MAP_ENABLE)), yes)
OPT_DEFS += -DDIP_SWITCH_MAP_ENABLE
endif
endif
ifeq ($(strip $(POTENTIOMETER_ENABLE)), yes)
ANALOG_DRIVER_REQUIRED = yes
endif
VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
WS2812_DRIVER ?= bitbang

View File

@@ -40,6 +40,7 @@ GENERIC_FEATURES = \
MOUSEKEY \
MUSIC \
OS_DETECTION \
POTENTIOMETER \
PROGRAMMABLE_BUTTON \
REPEAT_KEY \
SECURE \

View File

@@ -0,0 +1,339 @@
{
"aliases": {
/*
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ | │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ¿ │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ´ │ + │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ñ │ { │ } │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"KC_GRV": {
"key": "ES_PIPE",
"label": "|",
}
"KC_1": {
"key": "ES_1",
"label": "1",
}
"KC_2": {
"key": "ES_2",
"label": "2",
}
"KC_3": {
"key": "ES_3",
"label": "3",
}
"KC_4": {
"key": "ES_4",
"label": "4",
}
"KC_5": {
"key": "ES_5",
"label": "5",
}
"KC_6": {
"key": "ES_6",
"label": "6",
}
"KC_7": {
"key": "ES_7",
"label": "7",
}
"KC_8": {
"key": "ES_8",
"label": "8",
}
"KC_9": {
"key": "ES_9",
"label": "9",
}
"KC_0": {
"key": "ES_0",
"label": "0",
}
"KC_MINS": {
"key": "ES_QUOT",
"label": "'",
}
"KC_EQL": {
"key": "ES_IQUE",
"label": "¿",
}
"KC_Q": {
"key": "ES_Q",
"label": "Q",
}
"KC_W": {
"key": "ES_W",
"label": "W",
}
"KC_E": {
"key": "ES_E",
"label": "E",
}
"KC_R": {
"key": "ES_R",
"label": "R",
}
"KC_T": {
"key": "ES_T",
"label": "T",
}
"KC_Y": {
"key": "ES_Y",
"label": "Y",
}
"KC_U": {
"key": "ES_U",
"label": "U",
}
"KC_I": {
"key": "ES_I",
"label": "I",
}
"KC_O": {
"key": "ES_O",
"label": "O",
}
"KC_P": {
"key": "ES_P",
"label": "P",
}
"KC_LBRC": {
"key": "ES_ACUT",
"label": "´ (dead)",
}
"KC_RBRC": {
"key": "ES_PLUS",
"label": "+",
}
"KC_A": {
"key": "ES_A",
"label": "A",
}
"KC_S": {
"key": "ES_S",
"label": "S",
}
"KC_D": {
"key": "ES_D",
"label": "D",
}
"KC_F": {
"key": "ES_F",
"label": "F",
}
"KC_G": {
"key": "ES_G",
"label": "G",
}
"KC_H": {
"key": "ES_H",
"label": "H",
}
"KC_J": {
"key": "ES_J",
"label": "J",
}
"KC_K": {
"key": "ES_K",
"label": "K",
}
"KC_L": {
"key": "ES_L",
"label": "L",
}
"KC_SCLN": {
"key": "ES_NTIL",
"label": "Ñ",
}
"KC_QUOT": {
"key": "ES_LCBR",
"label": "{",
}
"KC_NUHS": {
"key": "ES_RCBR",
"label": "}",
}
"KC_NUBS": {
"key": "ES_LABK",
"label": "<",
}
"KC_Z": {
"key": "ES_Z",
"label": "Z",
}
"KC_X": {
"key": "ES_X",
"label": "X",
}
"KC_C": {
"key": "ES_C",
"label": "C",
}
"KC_V": {
"key": "ES_V",
"label": "V",
}
"KC_B": {
"key": "ES_B",
"label": "B",
}
"KC_N": {
"key": "ES_N",
"label": "N",
}
"KC_M": {
"key": "ES_M",
"label": "M",
}
"KC_COMM": {
"key": "ES_COMM",
"label": ",",
}
"KC_DOT": {
"key": "ES_DOT",
"label": ".",
}
"KC_SLSH": {
"key": "ES_MINS",
"label": "-",
}
/* Shifted symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ° │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¡ │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ * │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ │ │ │ │ │ │ │ │ │ │ [ │ ] │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"S(ES_PIPE)": {
"key": "ES_MORD",
"label": "°",
}
"S(ES_1)": {
"key": "ES_EXLM",
"label": "!",
}
"S(ES_2)": {
"key": "ES_DQUO",
"label": "\"",
}
"S(ES_3)": {
"key": "ES_NUMB",
"label": "#",
}
"S(ES_4)": {
"key": "ES_DLR",
"label": "$",
}
"S(ES_5)": {
"key": "ES_PERC",
"label": "%",
}
"S(ES_6)": {
"key": "ES_AMPR",
"label": "&",
}
"S(ES_7)": {
"key": "ES_SLSH",
"label": "/",
}
"S(ES_8)": {
"key": "ES_LPRN",
"label": "(",
}
"S(ES_9)": {
"key": "ES_RPRN",
"label": ")",
}
"S(ES_0)": {
"key": "ES_EQL",
"label": "=",
}
"S(ES_QUOT)": {
"key": "ES_QUES",
"label": "?",
}
"S(ES_IQUE)": {
"key": "ES_IEXL",
"label": "¡",
}
"S(ES_ACUT)": {
"key": "ES_DIAE",
"label": "¨ (dead)",
}
"S(ES_PLUS)": {
"key": "ES_ASTR",
"label": "*",
}
"S(ES_LCBR)": {
"key": "ES_LBRC",
"label": "[",
}
"S(ES_RCBR)": {
"key": "ES_RBRC",
"label": "]",
}
"S(ES_LABK)": {
"key": "ES_RABK",
"label": ">",
}
"S(ES_COMM)": {
"key": "ES_SCLN",
"label": ";",
}
"S(ES_DOT)": {
"key": "ES_COLN",
"label": ":",
}
"S(ES_MINS)": {
"key": "ES_UNDS",
"label": "_",
}
/* AltGr symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ¬ │ │ │ │ │ │ │ │ │ │ │ \ │ │ │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ │ @ │ │ │ │ │ │ │ │ │ │ │ ~ │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
* │ │ │ │ │ │ │ │ │ │ │ │ ^ │ ` │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ │ │ │ │ │ │ │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
"ALGR(ES_PIPE)": {
"key": "ES_NOT",
"label": "¬",
}
"ALGR(ES_QUOT)": {
"key": "ES_BSLS",
"label": "\\",
}
"ALGR(ES_Q)": {
"key": "ES_AT",
"label": "@",
}
"ALGR(ES_PLUS)": {
"key": "ES_TILD",
"label": "~",
}
"ALGR(ES_LCBR)": {
"key": "ES_CIRC",
"label": "^",
}
}
}

View File

@@ -45,6 +45,11 @@
"bootloader": "rp2040",
"processor": "RP2040"
},
"imera": {
"processor": "RP2040",
"bootloader": "rp2040",
"board": "QMK_PM2040"
},
"kb2040": {
"board": "QMK_PM2040",
"bootloader": "rp2040",

View File

@@ -117,6 +117,9 @@
"ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"},
"ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"},
// Potentiometer
"POTENTIOMETER_PINS": {"info_key": "potentiometer.pins", "value_type": "array"},
// PS/2
"PS2_CLOCK_PIN": {"info_key": "ps2.clock_pin"},
"PS2_DATA_PIN": {"info_key": "ps2.data_pin"},

View File

@@ -32,6 +32,7 @@
"NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"},
"PIN_COMPATIBLE": {"info_key": "pin_compatible"},
"PLATFORM_KEY": {"info_key": "platform_key", "to_json": false},
"POTENTIOMETER_ENABLE": {"info_key": "potentiometer.enabled", "value_type": "bool"},
"PS2_DRIVER": {"info_key": "ps2.driver"},
"PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"},
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},

View File

@@ -185,6 +185,9 @@
"eek": {
"target": "eek/silk_down"
},
"era/klein": {
"target": "era/sirind/klein_sd"
},
"ergodone": {
"target": "ktec/ergodone"
},
@@ -948,6 +951,12 @@
"launchpad/rev1": {
"target": "maple_computing/launchpad/rev1"
},
"lefty": {
"target": "smoll/lefty/rev2"
},
"lefty/rev1": {
"target": "smoll/lefty/rev1"
},
"lck75": {
"target": "lyso1/lck75"
},
@@ -1101,6 +1110,9 @@
"pursuit40": {
"target": "checkerboards/pursuit40"
},
"pw88": {
"target": "smoll/pw88"
},
"qaz": {
"target": "tominabox1/qaz"
},
@@ -1299,6 +1311,9 @@
"vn66": {
"target": "hnahkb/vn66"
},
"w1_at": {
"target": "geonworks/w1_at"
},
"wallaby": {
"target": "kkatano/wallaby"
},

View File

@@ -43,7 +43,7 @@
},
"development_board": {
"type": "string",
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris"]
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera"]
},
"pin_compatible": {
"type": "string",
@@ -418,6 +418,13 @@
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
}
},
"potentiometer": {
"type": "object",
"properties": {
"enabled": {"type": "boolean"},
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
}
},
"led_matrix": {
"type": "object",
"properties": {

View File

@@ -123,6 +123,7 @@
* [LED Indicators](feature_led_indicators.md)
* [MIDI](feature_midi.md)
* [Pointing Device](feature_pointing_device.md)
* [Potentiometer](feature_potentiometers.md)
* [PS/2 Mouse](feature_ps2_mouse.md)
* [Split Keyboard](feature_split_keyboard.md)
* [Stenography](feature_stenography.md)

View File

@@ -19,6 +19,7 @@ The following converters are available at this time:
| `promicro` | `elite_pi` |
| `promicro` | `helios` |
| `promicro` | `liatris` |
| `promicro` | `imera` |
| `promicro` | `michi` |
| `elite_c` | `stemcell` |
| `elite_c` | `rp2040_ce` |
@@ -82,6 +83,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` |
| [0xCB Helios](https://keeb.supply/products/0xcb-helios) | `helios` |
| [Liatris](https://splitkb.com/products/liatris) | `liatris` |
| [Imera](https://splitkb.com/products/imera) | `imera` |
| [Michi](https://github.com/ci-bus/michi-promicro-rp2040) | `michi` |
Converter summary:
@@ -99,6 +101,7 @@ Converter summary:
| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` |
| `helios` | `-e CONVERT_TO=helios` | `CONVERT_TO=helios` | `#ifdef CONVERT_TO_HELIOS` |
| `liatris` | `-e CONVERT_TO=liatris` | `CONVERT_TO=liatris` | `#ifdef CONVERT_TO_LIATRIS` |
| `imera` | `-e CONVERT_TO=imera` | `CONVERT_TO=imera` | `#ifdef CONVERT_TO_IMERA` |
| `michi` | `-e CONVERT_TO=michi` | `CONVERT_TO=michi` | `#ifdef CONVERT_TO_MICHI` |
### Proton C :id=proton_c

View File

@@ -20,6 +20,27 @@ or
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs
```
## DIP Switch map :id=dip-switch-map
DIP Switch mapping may be added to your `keymap.c`, which replicates the normal keyswitch functionality, but with dip switches. Add this to your keymap's `rules.mk`:
```make
DIP_SWITCH_MAP_ENABLE = yes
```
Your `keymap.c` will then need a dip switch mapping defined (for two dip switches):
```c
#if defined(DIP_SWITCH_MAP_ENABLE)
const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {
DIP_SWITCH_OFF_ON(DF(0), DF(1)),
DIP_SWITCH_OFF_ON(EC_NORM, EC_SWAP)
};
#endif
```
?> This should only be enabled at the keymap level.
## Callbacks
The callback functions can be inserted into your `<keyboard>.c`:

View File

@@ -69,9 +69,9 @@ The current list of available languages is:
| **italian_osx_iso** | **jis** | **latvian** | **lithuanian_azerty** |
| **lithuanian_qwerty** | **norman** | **norwegian** | **portuguese** |
| **portuguese_osx_iso** | **romanian** | **serbian_latin** | **slovak** |
| **slovenian** | **spanish_dvorak** | **spanish** | **swedish** |
| **turkish_f** | **turkish_q** | **uk** | **us_international** |
| **workman** | **workman_zxcvm** |
| **slovenian** | **spanish_dvorak** | **spanish_latin_america** | **spanish** |
| **swedish** | **turkish_f** | **turkish_q** | **uk** |
| **us_international** | **workman** | **workman_zxcvm** |
### Macro Basics

View File

@@ -69,10 +69,29 @@ The Analog Joystick is an analog (ADC) driven sensor. There are a variety of jo
| `ANALOG_JOYSTICK_Y_AXIS_PIN` | (Required) The pin used for the horizontal/Y axis. | _not defined_ |
| `ANALOG_JOYSTICK_AXIS_MIN` | (Optional) Sets the lower range to be considered movement. | `0` |
| `ANALOG_JOYSTICK_AXIS_MAX` | (Optional) Sets the upper range to be considered movement. | `1023` |
| `ANALOG_JOYSTICK_AUTO_AXIS` | (Optional) Sets ranges to be considered movement automatically. | _not defined_ |
| `ANALOG_JOYSTICK_SPEED_REGULATOR` | (Optional) The divisor used to slow down movement. (lower makes it faster) | `20` |
| `ANALOG_JOYSTICK_READ_INTERVAL` | (Optional) The interval in milliseconds between reads. | `10` |
| `ANALOG_JOYSTICK_SPEED_MAX` | (Optional) The maximum value used for motion. | `2` |
| `ANALOG_JOYSTICK_CLICK_PIN` | (Optional) The pin wired up to the press switch of the analog stick. | _not defined_ |
| `ANALOG_JOYSTICK_WEIGHTS` | (Optional) Use custom weights for lever positions. | _not defined_ |
| `ANALOG_JOYSTICK_CUTOFF` | (Optional) Cut off movement when joystick returns to start position. | _not defined_ |
If `ANALOG_JOYSTICK_AUTO_AXIS` is used, then `ANALOG_JOYSTICK_AXIS_MIN` and `ANALOG_JOYSTICK_AXIS_MAX` are ignored.
By default analog joystick implementation uses `x^2` weighting for lever positions. `ANALOG_JOYSTICK_WEIGHTS` allows to experiment with different configurations that might feel better.
E.g. This is weights for `((x-0.4)^3+0.064)/0.282`:
```c
#define ANALOG_JOYSTICK_WEIGHTS {0,2,4,5,7,8,9,10,12,13,14,15,15,16,17,18,18,19,19,20,20,21,21,21,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,25,25,25,26,26,26,27,28,28,29,29,30,31,32,33,34,35,36,37,38,40,41,43,44,46,48,49,51,53,56,58,60,62,65,68,70,73,76,79,82,85,89,92,96,100}
```
You can use following JS code to generate weights for different formulas:
```js
JSON.stringify(Array.from(Array(101).keys()).map(x => Math.ceil((((x/100-0.4)**3+0.064)/0.282*100))))
```
### Azoteq IQS5XX Trackpad
@@ -158,12 +177,13 @@ This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the
#### Common settings
| Setting | Description | Default |
| -------------------------------- | ---------------------------------------------------------- | ------------------------------------------- |
| `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` |
| `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X` |
| `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ |
| `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ |
| Setting | Description | Default |
| ------------------------------------ | ---------------------------------------------------------- | ------------------------------------------- |
| `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` |
| `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X` |
| `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ |
| `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ |
| `CIRQUE_PINNACLE_SKIP_SENSOR_CHECK` | (Optional) Skips sensor presence check | _not defined_ |
**`CIRQUE_PINNACLE_ATTENUATION`** is a measure of how much data is suppressed in regards to sensitivity. The higher the attenuation, the less sensitive the touchpad will be.

View File

@@ -0,0 +1,35 @@
# Potentiometers
Add this to your `rules.mk`:
```make
POTENTIOMETER_ENABLE = yes
```
and this to your `config.h`:
```c
#define POTENTIOMETER_PINS { B0 }
```
## Callbacks
The callback functions can be inserted into your `<keyboard>.c`:
```c
bool potentiometer_update_kb(uint8_t index, uint16_t value) {
if (!potentiometer_update_user(index, value)) {
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + value);
}
return true;
}
```
or `keymap.c`:
```c
bool potentiometer_update_user(uint8_t index, uint16_t value) {
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + value);
return false;
}
```

View File

@@ -19,18 +19,20 @@ The QMK CLI can be used to convert from normal images such as PNG files or anima
Supported devices:
| Display Panel | Panel Type | Size | Comms Transport | Driver |
|---------------|--------------------|------------------|-----------------|------------------------------------------|
| GC9A01 | RGB LCD (circular) | 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += gc9a01_spi` |
| ILI9163 | RGB LCD | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9163_spi` |
| ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9341_spi` |
| ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9488_spi` |
| SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ssd1351_spi` |
| ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7735_spi` |
| ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7789_spi` |
| SH1106 (SPI) | Monochrome OLED | 128x64 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += sh1106_spi` |
| SH1106 (I2C) | Monochrome OLED | 128x64 | I2C | `QUANTUM_PAINTER_DRIVERS += sh1106_i2c` |
| Surface | Virtual | User-defined | None | `QUANTUM_PAINTER_DRIVERS += surface` |
| Display Panel | Panel Type | Size | Comms Transport | Driver |
|----------------|--------------------|------------------|-----------------|------------------------------------------|
| GC9A01 | RGB LCD (circular) | 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += gc9a01_spi` |
| ILI9163 | RGB LCD | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9163_spi` |
| ILI9341 | RGB LCD | 240x320 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9341_spi` |
| ILI9488 | RGB LCD | 320x480 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ili9488_spi` |
| SSD1351 | RGB OLED | 128x128 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += ssd1351_spi` |
| ST7735 | RGB LCD | 132x162, 80x160 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7735_spi` |
| ST7789 | RGB LCD | 240x320, 240x240 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += st7789_spi` |
| SH1106 (SPI) | Monochrome OLED | 128x64 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += sh1106_spi` |
| SH1106 (I2C) | Monochrome OLED | 128x64 | I2C | `QUANTUM_PAINTER_DRIVERS += sh1106_i2c` |
| SSD1306 (SPI) | Monochrome OLED | 128x64 | SPI + D/C + RST | `QUANTUM_PAINTER_DRIVERS += sh1106_spi` |
| SSD1306 (I2C) | Monochrome OLED | 128x32 | I2C | `QUANTUM_PAINTER_DRIVERS += sh1106_i2c` |
| Surface | Virtual | User-defined | None | `QUANTUM_PAINTER_DRIVERS += surface` |
## Quantum Painter Configuration :id=quantum-painter-config
@@ -433,6 +435,10 @@ The maximum number of displays of each type can be configured by changing the fo
Native color format mono2 is compatible with SH1106
#### ** SSD1306 **
SSD1306 and SH1106 are almost entirely identical, to the point of being indisinguishable by Quantum Painter. Enable SH1106 support in Quantum Painter and create SH1106 devices in firmware to perform drawing operations on SSD1306 displays.
<!-- tabs:end -->
### ** Surface **

View File

@@ -480,6 +480,17 @@ Configures [One Shot keys](one_shot_keys.md).
* `timeout`
* The amount of time before the key is released in milliseconds.
## Potentiometer :id=potentiometer
Configures the [Potentiometer](feature_Potentiometers.md) feature.
* `potentiometer`
* `enabled`
* Enable the Potentiometer feature.
* Default: `false`
* `pins` (Required)
* The GPIO pin(s) connected to the Potentiometer(s).
## PS/2 :id=ps2
Configures the [PS/2](feature_ps2_mouse.md) feature.

View File

@@ -67,6 +67,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q
|Slovenian |`keymap_slovenian.h` |`sendstring_slovenian.h` |
|Spanish |`keymap_spanish.h` |`sendstring_spanish.h` |
|Spanish (Dvorak) |`keymap_spanish_dvorak.h` |`sendstring_spanish_dvorak.h` |
|Spanish (Latin America) |`keymap_spanish_latin_america.h` |`sendstring_spanish_latin_america.h`|
|Swedish |`keymap_swedish.h` |`sendstring_swedish.h` |
|Swedish (macOS, ANSI) |`keymap_swedish_mac_ansi.h` | |
|Swedish (macOS, ISO) |`keymap_swedish_mac_iso.h` | |

View File

@@ -210,6 +210,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
* [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040)
* [0xCB Helios](https://keeb.supply/products/0xcb-helios) ([Open Source](https://github.com/0xCB-dev/0xCB-Helios), DIY/PCBA/Shop)
* [Liatris](https://splitkb.com/products/liatris)
* [Imera](https://splitkb.com/products/imera)
* [Michi](https://github.com/ci-bus/michi-promicro-rp2040)
There are other, non-Pro Micro compatible boards out there. The most popular being:

View File

@@ -71,11 +71,6 @@ void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
apa102_end_frame(num_leds);
}
// Overwrite the default rgblight_call_driver to use apa102 driver
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) {
apa102_setleds(start_led, num_leds);
}
void static apa102_init(void) {
setPinOutput(APA102_DI_PIN);
setPinOutput(APA102_CI_PIN);

View File

@@ -19,6 +19,12 @@
#include "color.h"
#if defined(RGBLED_NUM)
# define APA102_LED_COUNT RGBLED_NUM
#elif defined(RGB_MATRIX_LED_COUNT)
# define APA102_LED_COUNT RGB_MATRIX_LED_COUNT
#endif
#ifndef APA102_DEFAULT_BRIGHTNESS
# define APA102_DEFAULT_BRIGHTNESS 31
#endif

View File

@@ -28,8 +28,7 @@
# define IS31FL3218_I2C_PERSISTENCE 0
#endif
// Reusable buffer for transfers
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
uint8_t g_pwm_buffer[IS31FL3218_PWM_REGISTER_COUNT];
@@ -39,27 +38,27 @@ uint8_t g_led_control_registers[IS31FL3218_LED_CONTROL_REGISTER_COUNT] = {0};
bool g_led_control_registers_update_required = false;
void is31fl3218_write_register(uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3218_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
#endif
}
void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) {
g_twi_transfer_buffer[0] = IS31FL3218_REG_PWM;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer, 18);
i2c_transfer_buffer[0] = IS31FL3218_REG_PWM;
memcpy(i2c_transfer_buffer + 1, pwm_buffer, 18);
#if IS31FL3218_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
}
#else
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
#endif
}

View File

@@ -43,6 +43,8 @@ extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT];
void is31fl3218_init(void);
void is31fl3218_write_register(uint8_t reg, uint8_t data);
void is31fl3218_set_value(int index, uint8_t value);
void is31fl3218_set_value_all(uint8_t value);

View File

@@ -28,8 +28,7 @@
# define IS31FL3218_I2C_PERSISTENCE 0
#endif
// Reusable buffer for transfers
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
uint8_t g_pwm_buffer[IS31FL3218_PWM_REGISTER_COUNT];
@@ -39,27 +38,27 @@ uint8_t g_led_control_registers[IS31FL3218_LED_CONTROL_REGISTER_COUNT] = {0};
bool g_led_control_registers_update_required = false;
void is31fl3218_write_register(uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3218_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
#endif
}
void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) {
g_twi_transfer_buffer[0] = IS31FL3218_REG_PWM;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer, 18);
i2c_transfer_buffer[0] = IS31FL3218_REG_PWM;
memcpy(i2c_transfer_buffer + 1, pwm_buffer, 18);
#if IS31FL3218_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
}
#else
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, i2c_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
#endif
}

View File

@@ -45,6 +45,8 @@ extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT];
void is31fl3218_init(void);
void is31fl3218_write_register(uint8_t reg, uint8_t data);
void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -33,8 +33,7 @@
# define IS31FL3731_I2C_PERSISTENCE 0
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
// Storing them like this is optimal for I2C transfers to the registers.
@@ -48,41 +47,45 @@ uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][IS31FL3731_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false};
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3731_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) {
break;
}
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
#endif
}
void is31fl3731_select_page(uint8_t addr, uint8_t page) {
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, page);
}
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes bank is already selected
// assumes page 0 is already selected
// transmit PWM registers in 9 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i += 16) {
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
g_twi_transfer_buffer[0] = 0x24 + i;
i2c_transfer_buffer[0] = 0x24 + i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3731_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
#endif
}
}
@@ -123,8 +126,7 @@ void is31fl3731_init(uint8_t addr) {
// then set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// select "function register" bank
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FUNCTION);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FUNCTION);
// enable software shutdown
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x00);
@@ -142,8 +144,7 @@ void is31fl3731_init(uint8_t addr) {
// audio sync off
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_AUDIO_SYNC, 0x00);
// select bank 0
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FRAME_1);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FRAME_1);
// turn off all LEDs in the LED control register
for (int i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
@@ -160,16 +161,15 @@ void is31fl3731_init(uint8_t addr) {
is31fl3731_write_register(addr, i, 0x00);
}
// select "function register" bank
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FUNCTION);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FUNCTION);
// disable software shutdown
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x01);
// select bank 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in bank 0
// select page 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in page 0
// as there's not much point in double-buffering
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FRAME_1);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FRAME_1);
}
void is31fl3731_set_value(int index, uint8_t value) {

View File

@@ -103,6 +103,7 @@ extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT];
void is31fl3731_init_drivers(void);
void is31fl3731_init(uint8_t addr);
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3731_select_page(uint8_t addr, uint8_t page);
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3731_set_value(int index, uint8_t value);

View File

@@ -32,8 +32,7 @@
# define IS31FL3731_I2C_PERSISTENCE 0
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
// Storing them like this is optimal for I2C transfers to the registers.
@@ -47,39 +46,43 @@ uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][IS31FL3731_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false};
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3731_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
#endif
}
void is31fl3731_select_page(uint8_t addr, uint8_t page) {
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, page);
}
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes bank is already selected
// assumes page 0 is already selected
// transmit PWM registers in 9 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i += 16) {
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
g_twi_transfer_buffer[0] = 0x24 + i;
i2c_transfer_buffer[0] = 0x24 + i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3731_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
#endif
}
}
@@ -120,8 +123,7 @@ void is31fl3731_init(uint8_t addr) {
// then set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// select "function register" bank
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FUNCTION);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FUNCTION);
// enable software shutdown
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x00);
@@ -139,8 +141,7 @@ void is31fl3731_init(uint8_t addr) {
// audio sync off
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_AUDIO_SYNC, 0x00);
// select bank 0
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FRAME_1);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FRAME_1);
// turn off all LEDs in the LED control register
for (int i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
@@ -157,16 +158,15 @@ void is31fl3731_init(uint8_t addr) {
is31fl3731_write_register(addr, i, 0x00);
}
// select "function register" bank
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FUNCTION);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FUNCTION);
// disable software shutdown
is31fl3731_write_register(addr, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x01);
// select bank 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in bank 0
// select page 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in page 0
// as there's not much point in double-buffering
is31fl3731_write_register(addr, IS31FL3731_REG_COMMAND, IS31FL3731_COMMAND_FRAME_1);
is31fl3731_select_page(addr, IS31FL3731_COMMAND_FRAME_1);
}
void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {

View File

@@ -104,6 +104,7 @@ extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT];
void is31fl3731_init_drivers(void);
void is31fl3731_init(uint8_t addr);
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3731_select_page(uint8_t addr, uint8_t page);
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -63,11 +63,10 @@
# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3733 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
@@ -80,45 +79,50 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT]
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
return true;
}
void is31fl3733_select_page(uint8_t addr, uint8_t page) {
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, page);
}
bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assumes PG1 is already selected.
// Assumes page 1 is already selected.
// If any of the transactions fails function returns false.
// Transmit PWM registers in 12 transfers of 16 bytes.
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// Iterate over the pwm_buffer contents at 16 byte intervals.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// Copy the data from i to i+15.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -163,32 +167,23 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
// then disable software shutdown.
// Sync is passed so set it according to the datasheet.
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_LED_CONTROL);
// Select PG0
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_PWM);
// Select PG1
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_FUNCTION);
// Select PG3
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3733_write_register(addr, IS31FL3733_FUNCTION_REG_SW_PULLUP, IS31FL3733_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -239,11 +234,9 @@ void is31fl3733_set_led_control_register(uint8_t index, bool value) {
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// If any of the transactions fail we risk writing dirty page 0,
// refresh page 0 just in case.
if (!is31fl3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
g_led_control_registers_update_required[index] = true;
@@ -254,9 +247,8 @@ void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -117,6 +117,7 @@ extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT];
void is31fl3733_init_drivers(void);
void is31fl3733_init(uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3733_select_page(uint8_t addr, uint8_t page);
bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3733_set_value(int index, uint8_t value);

View File

@@ -62,11 +62,10 @@
# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3733 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
@@ -79,45 +78,50 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT]
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
return true;
}
void is31fl3733_select_page(uint8_t addr, uint8_t page) {
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, page);
}
bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assumes PG1 is already selected.
// Assumes page 1 is already selected.
// If any of the transactions fails function returns false.
// Transmit PWM registers in 12 transfers of 16 bytes.
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// Iterate over the pwm_buffer contents at 16 byte intervals.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// Copy the data from i to i+15.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -162,32 +166,23 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
// then disable software shutdown.
// Sync is passed so set it according to the datasheet.
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_LED_CONTROL);
// Select PG0
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_PWM);
// Select PG1
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_FUNCTION);
// Select PG3
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3733_write_register(addr, IS31FL3733_FUNCTION_REG_SW_PULLUP, IS31FL3733_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -254,11 +249,9 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1.
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// If any of the transactions fail we risk writing dirty page 0,
// refresh page 0 just in case.
if (!is31fl3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
g_led_control_registers_update_required[index] = true;
@@ -269,9 +262,8 @@ void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
is31fl3733_write_register(addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
is31fl3733_select_page(addr, IS31FL3733_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -142,6 +142,7 @@ extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT];
void is31fl3733_init_drivers(void);
void is31fl3733_init(uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3733_select_page(uint8_t addr, uint8_t page);
bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -47,11 +47,10 @@
# define IS31FL3736_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3736 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3736_write_pwm_buffer() but it's
@@ -63,38 +62,43 @@ uint8_t g_led_control_registers[IS31FL3736_DRIVER_COUNT][IS31FL3736_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] = {false};
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3736_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
#endif
}
void is31fl3736_select_page(uint8_t addr, uint8_t page) {
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, page);
}
void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes PG1 is already selected
// assumes page 1 is already selected
// transmit PWM registers in 12 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3736_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
#endif
}
}
@@ -135,32 +139,23 @@ void is31fl3736_init(uint8_t addr) {
// Set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_LED_CONTROL);
// Select PG0
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3736_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_PWM);
// Select PG1
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_FUNCTION);
// Select PG3
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3736_write_register(addr, IS31FL3736_FUNCTION_REG_SW_PULLUP, IS31FL3736_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -217,9 +212,7 @@ void is31fl3736_set_led_control_register(uint8_t index, bool value) {
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_PWM);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_PWM);
is31fl3736_write_pwm_buffer(addr, g_pwm_buffer[index]);
g_pwm_buffer_update_required[index] = false;
@@ -228,9 +221,8 @@ void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_LED_CONTROL);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3736_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -112,6 +112,7 @@ extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT];
void is31fl3736_init_drivers(void);
void is31fl3736_init(uint8_t addr);
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3736_select_page(uint8_t addr, uint8_t page);
void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3736_set_value(int index, uint8_t value);

View File

@@ -47,11 +47,10 @@
# define IS31FL3736_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3736 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3736_write_pwm_buffer() but it's
@@ -63,38 +62,43 @@ uint8_t g_led_control_registers[IS31FL3736_DRIVER_COUNT][IS31FL3736_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] = {false};
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3736_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
#endif
}
void is31fl3736_select_page(uint8_t addr, uint8_t page) {
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, page);
}
void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes PG1 is already selected
// assumes page 1 is already selected
// transmit PWM registers in 12 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3736_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
#endif
}
}
@@ -135,32 +139,23 @@ void is31fl3736_init(uint8_t addr) {
// Set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_REG_LED_CONTROL);
// Select PG0
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_REG_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3736_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITELOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_PWM);
// Select PG1
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3736_PWM_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_FUNCTION);
// Select PG3
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3736_write_register(addr, IS31FL3736_FUNCTION_REG_SW_PULLUP, IS31FL3736_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -234,9 +229,7 @@ void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_PWM);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_PWM);
is31fl3736_write_pwm_buffer(addr, g_pwm_buffer[index]);
g_pwm_buffer_update_required[index] = false;
@@ -245,9 +238,8 @@ void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND_WRITE_LOCK, IS31FL3736_COMMAND_WRITE_LOCK_MAGIC);
is31fl3736_write_register(addr, IS31FL3736_REG_COMMAND, IS31FL3736_COMMAND_LED_CONTROL);
is31fl3736_select_page(addr, IS31FL3736_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3736_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3736_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -126,6 +126,7 @@ extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT];
void is31fl3736_init_drivers(void);
void is31fl3736_init(uint8_t addr);
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3736_select_page(uint8_t addr, uint8_t page);
void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -49,11 +49,10 @@
# define IS31FL3737_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3737 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3737_write_pwm_buffer() but it's
@@ -66,38 +65,43 @@ uint8_t g_led_control_registers[IS31FL3737_DRIVER_COUNT][IS31FL3737_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] = {false};
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3737_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
#endif
}
void is31fl3737_select_page(uint8_t addr, uint8_t page) {
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, page);
}
void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes PG1 is already selected
// assumes page 1 is already selected
// transmit PWM registers in 12 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3737_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
#endif
}
}
@@ -138,32 +142,23 @@ void is31fl3737_init(uint8_t addr) {
// Set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_LED_CONTROL);
// Select PG0
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3737_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_PWM);
// Select PG1
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_FUNCTION);
// Select PG3
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3737_write_register(addr, IS31FL3737_FUNCTION_REG_SW_PULLUP, IS31FL3737_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -214,9 +209,7 @@ void is31fl3737_set_led_control_register(uint8_t index, bool value) {
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_PWM);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_PWM);
is31fl3737_write_pwm_buffer(addr, g_pwm_buffer[index]);
g_pwm_buffer_update_required[index] = false;
@@ -225,9 +218,8 @@ void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_LED_CONTROL);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3737_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -102,6 +102,7 @@ extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT];
void is31fl3737_init_drivers(void);
void is31fl3737_init(uint8_t addr);
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3737_select_page(uint8_t addr, uint8_t page);
void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3737_set_value(int index, uint8_t value);

View File

@@ -49,11 +49,10 @@
# define IS31FL3737_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3737 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3737_write_pwm_buffer() but it's
@@ -66,38 +65,43 @@ uint8_t g_led_control_registers[IS31FL3737_DRIVER_COUNT][IS31FL3737_LED_CONTROL_
bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] = {false};
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3737_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
#endif
}
void is31fl3737_select_page(uint8_t addr, uint8_t page) {
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, page);
}
void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// assumes PG1 is already selected
// assumes page 1 is already selected
// transmit PWM registers in 12 transfers of 16 bytes
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// iterate over the pwm_buffer contents at 16 byte intervals
for (int i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// copy the data from i to i+15
// device will auto-increment register for data after the first byte
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 16);
#if IS31FL3737_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
#endif
}
}
@@ -138,32 +142,23 @@ void is31fl3737_init(uint8_t addr) {
// Set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_LED_CONTROL);
// Select PG0
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3737_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_PWM);
// Select PG1
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3737_PWM_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, 0x00);
}
// Unlock the command register.
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_FUNCTION);
// Select PG3
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3737_write_register(addr, IS31FL3737_FUNCTION_REG_SW_PULLUP, IS31FL3737_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -230,9 +225,7 @@ void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_PWM);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_PWM);
is31fl3737_write_pwm_buffer(addr, g_pwm_buffer[index]);
g_pwm_buffer_update_required[index] = false;
@@ -241,9 +234,8 @@ void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND_WRITE_LOCK, IS31FL3737_COMMAND_WRITE_LOCK_MAGIC);
is31fl3737_write_register(addr, IS31FL3737_REG_COMMAND, IS31FL3737_COMMAND_LED_CONTROL);
is31fl3737_select_page(addr, IS31FL3737_COMMAND_LED_CONTROL);
for (int i = 0; i < IS31FL3737_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3737_write_register(addr, i, g_led_control_registers[index][i]);
}

View File

@@ -119,6 +119,7 @@ extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT];
void is31fl3737_init_drivers(void);
void is31fl3737_init(uint8_t addr);
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3737_select_page(uint8_t addr, uint8_t page);
void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -52,11 +52,10 @@
# define IS31FL3741_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20] = {0xFF};
uint8_t i2c_transfer_buffer[20] = {0xFF};
// These buffers match the IS31FL3741 and IS31FL3741A PWM registers.
// The scaling buffers match the PG2 and PG3 LED On/Off registers.
// The scaling buffers match the page 2 and 3 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3741_write_pwm_buffer() but it's
@@ -68,56 +67,59 @@ bool g_scaling_registers_update_required[IS31FL3741_DRIVER_COUNT] = {false};
uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_PWM_REGISTER_COUNT];
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
#endif
}
void is31fl3741_select_page(uint8_t addr, uint8_t page) {
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, page);
}
bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assume PG0 is already selected
// Assume page 0 is already selected
for (int i = 0; i < 342; i += 18) {
if (i == 180) {
// unlock the command register and select PG1
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_PWM_1);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_PWM_1);
}
g_twi_transfer_buffer[0] = i % 180;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
i2c_transfer_buffer[0] = i % 180;
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 18);
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
}
// transfer the left cause the total number is 351
g_twi_transfer_buffer[0] = 162;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9);
i2c_transfer_buffer[0] = 162;
memcpy(i2c_transfer_buffer + 1, pwm_buffer + 342, 9);
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -162,11 +164,7 @@ void is31fl3741_init(uint8_t addr) {
// then disable software shutdown.
// Unlock the command register.
// Unlock the command register.
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
// Select PG4
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_FUNCTION);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_FUNCTION);
// Set to Normal operation
is31fl3741_write_register(addr, IS31FL3741_FUNCTION_REG_CONFIGURATION, IS31FL3741_CONFIGURATION);
@@ -218,9 +216,7 @@ void is31fl3741_set_led_control_register(uint8_t index, bool value) {
void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// unlock the command register and select PG2
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_PWM_0);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_PWM_0);
is31fl3741_write_pwm_buffer(addr, g_pwm_buffer[index]);
}
@@ -236,20 +232,16 @@ void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t value) {
void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_scaling_registers_update_required[index]) {
// unlock the command register and select PG2
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_SCALING_0);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_SCALING_0);
// CS1_SW1 to CS30_SW6 are on PG2
// CS1_SW1 to CS30_SW6 are on page 2
for (int i = CS1_SW1; i <= CS30_SW6; ++i) {
is31fl3741_write_register(addr, i, g_scaling_registers[index][i]);
}
// unlock the command register and select PG3
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_SCALING_1);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_SCALING_1);
// CS1_SW7 to CS39_SW9 are on PG3
// CS1_SW7 to CS39_SW9 are on page 3
for (int i = CS1_SW7; i <= CS39_SW9; ++i) {
is31fl3741_write_register(addr, i - CS1_SW7, g_scaling_registers[index][i]);
}

View File

@@ -104,6 +104,7 @@ extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT];
void is31fl3741_init_drivers(void);
void is31fl3741_init(uint8_t addr);
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3741_select_page(uint8_t addr, uint8_t page);
bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3741_set_value(int index, uint8_t value);

View File

@@ -52,11 +52,10 @@
# define IS31FL3741_GLOBAL_CURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20] = {0xFF};
uint8_t i2c_transfer_buffer[20] = {0xFF};
// These buffers match the IS31FL3741 and IS31FL3741A PWM registers.
// The scaling buffers match the PG2 and PG3 LED On/Off registers.
// The scaling buffers match the page 2 and 3 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3741_write_pwm_buffer() but it's
@@ -68,56 +67,59 @@ bool g_scaling_registers_update_required[IS31FL3741_DRIVER_COUNT] = {false};
uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_PWM_REGISTER_COUNT];
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
#endif
}
void is31fl3741_select_page(uint8_t addr, uint8_t page) {
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, page);
}
bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assume PG0 is already selected
// Assume page 0 is already selected
for (int i = 0; i < 342; i += 18) {
if (i == 180) {
// unlock the command register and select PG1
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_PWM_1);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_PWM_1);
}
g_twi_transfer_buffer[0] = i % 180;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
i2c_transfer_buffer[0] = i % 180;
memcpy(i2c_transfer_buffer + 1, pwm_buffer + i, 18);
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
}
// transfer the left cause the total number is 351
g_twi_transfer_buffer[0] = 162;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9);
i2c_transfer_buffer[0] = 162;
memcpy(i2c_transfer_buffer + 1, pwm_buffer + 342, 9);
#if IS31FL3741_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -162,11 +164,7 @@ void is31fl3741_init(uint8_t addr) {
// then disable software shutdown.
// Unlock the command register.
// Unlock the command register.
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
// Select PG4
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_FUNCTION);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_FUNCTION);
// Set to Normal operation
is31fl3741_write_register(addr, IS31FL3741_FUNCTION_REG_CONFIGURATION, IS31FL3741_CONFIGURATION);
@@ -232,9 +230,7 @@ void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// unlock the command register and select PG2
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_PWM_0);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_PWM_0);
is31fl3741_write_pwm_buffer(addr, g_pwm_buffer[index]);
}
@@ -252,20 +248,16 @@ void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_
void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_scaling_registers_update_required[index]) {
// unlock the command register and select PG2
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_SCALING_0);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_SCALING_0);
// CS1_SW1 to CS30_SW6 are on PG2
// CS1_SW1 to CS30_SW6 are on page 2
for (int i = CS1_SW1; i <= CS30_SW6; ++i) {
is31fl3741_write_register(addr, i, g_scaling_registers[index][i]);
}
// unlock the command register and select PG3
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND_WRITE_LOCK, IS31FL3741_COMMAND_WRITE_LOCK_MAGIC);
is31fl3741_write_register(addr, IS31FL3741_REG_COMMAND, IS31FL3741_COMMAND_SCALING_1);
is31fl3741_select_page(addr, IS31FL3741_COMMAND_SCALING_1);
// CS1_SW7 to CS39_SW9 are on PG3
// CS1_SW7 to CS39_SW9 are on page 3
for (int i = CS1_SW7; i <= CS39_SW9; ++i) {
is31fl3741_write_register(addr, i - CS1_SW7, g_scaling_registers[index][i]);
}

View File

@@ -121,6 +121,7 @@ extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT];
void is31fl3741_init_drivers(void);
void is31fl3741_init(uint8_t addr);
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
void is31fl3741_select_page(uint8_t addr, uint8_t page);
bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);

View File

@@ -31,8 +31,7 @@
# define ISSI_PERSISTENCE 0
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the PWM & scaling registers.
// Storing them like this is optimal for I2C transfers to the registers.
@@ -45,15 +44,15 @@ bool g_scaling_buffer_update_required[DRIVER_COUNT] = {false};
// For writing of single register entry
void IS31FL_write_single_register(uint8_t addr, uint8_t reg, uint8_t data) {
// Set register address and register data ready to write
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if ISSI_PERSISTENCE > 0
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
}
#else
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
i2c_transmit(addr << 1, i2c_transfer_buffer, 2, ISSI_TIMEOUT);
#endif
}
@@ -64,18 +63,18 @@ bool IS31FL_write_multi_registers(uint8_t addr, uint8_t *source_buffer, uint8_t
// Split the buffer into chunks to transfer
for (int i = 0; i < buffer_size; i += transfer_size) {
// Set the first entry of transfer buffer to the first register we want to write
g_twi_transfer_buffer[0] = i + start_reg_addr;
i2c_transfer_buffer[0] = i + start_reg_addr;
// Copy the section of our source buffer into the transfer buffer after first register address
memcpy(g_twi_transfer_buffer + 1, source_buffer + i, transfer_size);
memcpy(i2c_transfer_buffer + 1, source_buffer + i, transfer_size);
#if ISSI_PERSISTENCE > 0
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, transfer_size + 1, ISSI_TIMEOUT) != 0) {
return false;
}
#endif

View File

@@ -37,8 +37,7 @@
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
uint8_t i2c_transfer_buffer[20];
// These buffers match the SNLED27351 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
@@ -54,47 +53,51 @@ bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT]
bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if SNLED27351_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
#endif
return true;
}
void snled27351_select_page(uint8_t addr, uint8_t page) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, page);
}
bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assumes PG1 is already selected.
// If any of the transactions fails function returns false.
// Transmit PWM registers in 12 transfers of 16 bytes.
// g_twi_transfer_buffer[] is 20 bytes
// i2c_transfer_buffer[] is 20 bytes
// Iterate over the pwm_buffer contents at 16 byte intervals.
for (int i = 0; i < SNLED27351_PWM_REGISTER_COUNT; i += 16) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// Copy the data from i to i+15.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
for (int j = 0; j < 16; j++) {
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
i2c_transfer_buffer[1 + j] = pwm_buffer[i + j];
}
#if SNLED27351_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -133,8 +136,8 @@ void snled27351_init_drivers(void) {
}
void snled27351_init(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to shutdown mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_SHUTDOWN);
// Setting internal channel pulldown/pullup
@@ -147,33 +150,35 @@ void snled27351_init(uint8_t addr) {
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SLEW_RATE_CONTROL_MODE_2, SNLED27351_SLEW_RATE_CONTROL_MODE_2_DSL_ENABLE | SNLED27351_SLEW_RATE_CONTROL_MODE_2_SSL_ENABLE);
// Setting Iref
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SLEEP, 0);
// Set LED CONTROL PAGE (Page 0)
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
snled27351_write_register(addr, i, 0x00);
}
// Set PWM PAGE (Page 1)
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_PWM);
snled27351_select_page(addr, SNLED27351_COMMAND_PWM);
for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
snled27351_write_register(addr, i, 0x00);
}
// Set CURRENT PAGE (Page 4)
snled27351_select_page(addr, SNLED27351_COMMAND_CURRENT_TUNE);
uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE;
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_CURRENT_TUNE);
for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
snled27351_write_register(addr, i, current_tune_reg_list[i]);
}
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
// Enable LEDs ON/OFF
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
snled27351_write_register(addr, i, 0xFF);
}
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to normal mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_NORMAL);
}
@@ -215,7 +220,7 @@ void snled27351_set_led_control_register(uint8_t index, bool value) {
void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_PWM);
snled27351_select_page(addr, SNLED27351_COMMAND_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -228,7 +233,8 @@ void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_REGISTER_COUNT; i++) {
snled27351_write_register(addr, i, g_led_control_registers[index][i]);
}
@@ -250,15 +256,15 @@ void snled27351_flush(void) {
}
void snled27351_sw_return_normal(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to normal mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_NORMAL);
}
void snled27351_sw_shutdown(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to shutdown mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_SHUTDOWN);
// Write SW Sleep Register

View File

@@ -155,6 +155,7 @@ extern const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT];
void snled27351_init_drivers(void);
void snled27351_init(uint8_t addr);
void snled27351_select_page(uint8_t addr, uint8_t page);
bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data);
bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);

View File

@@ -37,8 +37,7 @@
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
#endif
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[65];
uint8_t i2c_transfer_buffer[65];
// These buffers match the SNLED27351 PWM registers.
// The control buffers match the PG0 LED On/Off registers.
@@ -54,23 +53,27 @@ bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT]
bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
i2c_transfer_buffer[0] = reg;
i2c_transfer_buffer[1] = data;
#if SNLED27351_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
#endif
return true;
}
void snled27351_select_page(uint8_t addr, uint8_t page) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, page);
}
bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Assumes PG1 is already selected.
// If any of the transactions fails function returns false.
@@ -78,22 +81,22 @@ bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Iterate over the pwm_buffer contents at 64 byte intervals.
for (uint8_t i = 0; i < SNLED27351_PWM_REGISTER_COUNT; i += 64) {
g_twi_transfer_buffer[0] = i;
i2c_transfer_buffer[0] = i;
// Copy the data from i to i+63.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
for (uint8_t j = 0; j < 64; j++) {
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
i2c_transfer_buffer[1 + j] = pwm_buffer[i + j];
}
#if SNLED27351_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
if (i2c_transmit(addr << 1, i2c_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -132,8 +135,8 @@ void snled27351_init_drivers(void) {
}
void snled27351_init(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to shutdown mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_SHUTDOWN);
// Setting internal channel pulldown/pullup
@@ -146,33 +149,34 @@ void snled27351_init(uint8_t addr) {
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SLEW_RATE_CONTROL_MODE_2, SNLED27351_SLEW_RATE_CONTROL_MODE_2_DSL_ENABLE | SNLED27351_SLEW_RATE_CONTROL_MODE_2_SSL_ENABLE);
// Setting Iref
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SLEEP, 0);
// Set LED CONTROL PAGE (Page 0)
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
snled27351_write_register(addr, i, 0x00);
}
// Set PWM PAGE (Page 1)
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_PWM);
snled27351_select_page(addr, SNLED27351_COMMAND_PWM);
for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
snled27351_write_register(addr, i, 0x00);
}
// Set CURRENT PAGE (Page 4)
snled27351_select_page(addr, SNLED27351_COMMAND_CURRENT_TUNE);
uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE;
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_CURRENT_TUNE);
for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
snled27351_write_register(addr, i, current_tune_reg_list[i]);
}
// Enable LEDs ON/OFF
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
snled27351_write_register(addr, i, 0xFF);
}
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to normal mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_NORMAL);
}
@@ -230,7 +234,7 @@ void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bo
void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_PWM);
snled27351_select_page(addr, SNLED27351_COMMAND_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -243,7 +247,8 @@ void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_LED_CONTROL);
snled27351_select_page(addr, SNLED27351_COMMAND_LED_CONTROL);
for (int i = 0; i < SNLED27351_LED_CONTROL_REGISTER_COUNT; i++) {
snled27351_write_register(addr, i, g_led_control_registers[index][i]);
}
@@ -265,15 +270,15 @@ void snled27351_flush(void) {
}
void snled27351_sw_return_normal(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to normal mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_NORMAL);
}
void snled27351_sw_shutdown(uint8_t addr) {
// Select to function page
snled27351_write_register(addr, SNLED27351_REG_COMMAND, SNLED27351_COMMAND_FUNCTION);
snled27351_select_page(addr, SNLED27351_COMMAND_FUNCTION);
// Setting LED driver to shutdown mode
snled27351_write_register(addr, SNLED27351_FUNCTION_REG_SOFTWARE_SHUTDOWN, SNLED27351_SOFTWARE_SHUTDOWN_SSD_SHUTDOWN);
// Write SW Sleep Register

View File

@@ -169,6 +169,7 @@ extern const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT];
void snled27351_init_drivers(void);
void snled27351_init(uint8_t addr);
void snled27351_select_page(uint8_t addr, uint8_t page);
bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data);
bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);

View File

@@ -44,7 +44,7 @@ __attribute__((weak)) bool qp_sh1106_init(painter_device_t device, painter_rotat
}
// clang-format off
const uint8_t sh1106_init_sequence[] = {
uint8_t sh1106_init_sequence[] = {
// Command, Delay, N, Data[N]
SH1106_SET_MUX_RATIO, 0, 1, 0x3F,
SH1106_DISPLAY_OFFSET, 0, 1, 0x00,
@@ -61,6 +61,16 @@ __attribute__((weak)) bool qp_sh1106_init(painter_device_t device, painter_rotat
};
// clang-format on
// If the display height is anything other than the default 64 pixels, change SH1106_SET_MUX_RATIO data byte to the correct value
if (driver->oled.base.panel_height != 64) {
sh1106_init_sequence[3] = driver->oled.base.panel_height - 1;
}
// For 128x32 or 96x16 displays, change SH1106_COM_PADS_HW_CFG data byte from alternative (0x12) to sequential (0x02) configuration
if (driver->oled.base.panel_height <= 32) {
sh1106_init_sequence[20] = 0x02;
}
qp_comms_bulk_command_sequence(device, sh1106_init_sequence, sizeof(sh1106_init_sequence));
return true;
}
@@ -203,4 +213,4 @@ painter_device_t qp_sh1106_make_i2c_device(uint16_t panel_width, uint16_t panel_
return NULL;
}
#endif // QUANTUM_PAINTER_SH1106_SPI_ENABLE
#endif // QUANTUM_PAINTER_SH1106_I2C_ENABLE

View File

@@ -16,7 +16,7 @@
#define SH1106_COM_PADS_HW_CFG 0xDA
#define SH1106_SET_CONTRAST 0x81
#define SH1106_SET_PRECHARGE_PERIOD 0xD9
#define SH1106_VCOM_DETECT 0xDB
#define SH1106_VCOM_DESELECT_LEVEL 0xDB
#define SH1106_ALL_ON_RESUME 0xA4
#define SH1106_NON_INVERTING_DISPLAY 0xA6
#define SH1106_DEACTIVATE_SCROLL 0x2E

View File

@@ -22,17 +22,28 @@
#include <stdlib.h>
// Set Parameters
#ifndef ANALOG_JOYSTICK_AUTO_AXIS
uint16_t minAxisValue = ANALOG_JOYSTICK_AXIS_MIN;
uint16_t maxAxisValue = ANALOG_JOYSTICK_AXIS_MAX;
#else
int16_t minAxisValues[2];
int16_t maxAxisValues[2];
#endif
uint8_t maxCursorSpeed = ANALOG_JOYSTICK_SPEED_MAX;
uint8_t speedRegulator = ANALOG_JOYSTICK_SPEED_REGULATOR; // Lower Values Create Faster Movement
#ifdef ANALOG_JOYSTICK_WEIGHTS
int8_t weights[101] = ANALOG_JOYSTICK_WEIGHTS;
#endif
int16_t xOrigin, yOrigin;
uint16_t lastCursor = 0;
int16_t axisCoordinate(pin_t pin, uint16_t origin) {
uint8_t prevValues[2] = {0, 0};
int16_t axisCoordinate(pin_t pin, uint16_t origin, uint8_t axis) {
int8_t direction;
int16_t distanceFromOrigin;
int16_t range;
@@ -43,12 +54,27 @@ int16_t axisCoordinate(pin_t pin, uint16_t origin) {
return 0;
} else if (origin > position) {
distanceFromOrigin = origin - position;
range = origin - minAxisValue;
direction = -1;
#ifdef ANALOG_JOYSTICK_AUTO_AXIS
if (position < minAxisValues[axis]) {
minAxisValues[axis] = position;
}
range = origin - minAxisValues[axis];
#else
range = origin - minAxisValue;
#endif
direction = -1;
} else {
distanceFromOrigin = position - origin;
range = maxAxisValue - origin;
direction = 1;
#ifdef ANALOG_JOYSTICK_AUTO_AXIS
if (position > maxAxisValues[axis]) {
maxAxisValues[axis] = position;
}
range = maxAxisValues[axis] - origin;
#else
range = maxAxisValue - origin;
#endif
direction = 1;
}
float percent = (float)distanceFromOrigin / range;
@@ -62,14 +88,29 @@ int16_t axisCoordinate(pin_t pin, uint16_t origin) {
}
}
int8_t axisToMouseComponent(pin_t pin, int16_t origin, uint8_t maxSpeed) {
int16_t coordinate = axisCoordinate(pin, origin);
int8_t axisToMouseComponent(pin_t pin, int16_t origin, uint8_t maxSpeed, uint8_t axis) {
int16_t coordinate = axisCoordinate(pin, origin, axis);
int8_t result;
#ifndef ANALOG_JOYSTICK_WEIGHTS
if (coordinate != 0) {
float percent = (float)coordinate / 100;
return percent * maxCursorSpeed * (abs(coordinate) / speedRegulator);
result = percent * maxCursorSpeed * (abs(coordinate) / speedRegulator);
} else {
return 0;
}
#else
result = weights[abs(coordinate)] * (coordinate < 0 ? -1 : 1) * maxCursorSpeed / speedRegulator;
#endif
#ifdef ANALOG_JOYSTICK_CUTOFF
uint8_t pv = prevValues[axis];
prevValues[axis] = abs(result);
if (pv > abs(result)) {
return 0;
}
#endif
return result;
}
report_analog_joystick_t analog_joystick_read(void) {
@@ -77,8 +118,8 @@ report_analog_joystick_t analog_joystick_read(void) {
if (timer_elapsed(lastCursor) > ANALOG_JOYSTICK_READ_INTERVAL) {
lastCursor = timer_read();
report.x = axisToMouseComponent(ANALOG_JOYSTICK_X_AXIS_PIN, xOrigin, maxCursorSpeed);
report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed);
report.x = axisToMouseComponent(ANALOG_JOYSTICK_X_AXIS_PIN, xOrigin, maxCursorSpeed, 0);
report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed, 1);
}
#ifdef ANALOG_JOYSTICK_CLICK_PIN
report.button = !readPin(ANALOG_JOYSTICK_CLICK_PIN);
@@ -93,4 +134,11 @@ void analog_joystick_init(void) {
// Account for drift
xOrigin = analogReadPin(ANALOG_JOYSTICK_X_AXIS_PIN);
yOrigin = analogReadPin(ANALOG_JOYSTICK_Y_AXIS_PIN);
#ifdef ANALOG_JOYSTICK_AUTO_AXIS
minAxisValues[0] = xOrigin - 100;
minAxisValues[1] = yOrigin - 100;
maxAxisValues[0] = xOrigin + 100;
maxAxisValues[1] = yOrigin + 100;
#endif
}

View File

@@ -216,6 +216,13 @@ void cirque_pinnacle_cursor_smoothing(bool enable) {
RAP_Write(HOSTREG__FEEDCONFIG3, feedconfig3);
}
// Check sensor is connected
bool cirque_pinnacle_connected(void) {
uint8_t zidle = 0;
RAP_ReadBytes(HOSTREG__ZIDLE, &zidle, 1);
return zidle == HOSTREG__ZIDLE_DEFVAL;
}
/* Pinnacle-based TM040040/TM035035/TM023023 Functions */
void cirque_pinnacle_init(void) {
#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
@@ -274,6 +281,10 @@ void cirque_pinnacle_init(void) {
}
cirque_pinnacle_enable_feed(true);
#ifndef CIRQUE_PINNACLE_SKIP_SENSOR_CHECK
touchpad_init = cirque_pinnacle_connected();
#endif
}
pinnacle_data_t cirque_pinnacle_read_data(void) {

View File

@@ -1,3 +0,0 @@
#pragma once
// place overrides here

View File

@@ -1,18 +0,0 @@
/* Copyright 2021 Dan Nixon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@@ -1,19 +0,0 @@
/* Copyright 2021 Atsushi Nagase
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -1,16 +0,0 @@
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@@ -1,3 +0,0 @@
#pragma once
// place overrides here

View File

@@ -1,19 +0,0 @@
/* Copyright 2019 Amber Holly
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -1,19 +0,0 @@
/* Copyright 2019 Takuya Urakawa (dm9records.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -1,19 +0,0 @@
/* Copyright 2019 Takuya Urakawa (dm9records.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -1,19 +0,0 @@
/* Copyright 2019 Ian Canino (ian@thecommittedbug.io)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -14,10 +14,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dp60.h"
#include "rgblight.h"
#include QMK_KEYBOARD_H
#include "ws2812.h"
// caps led
const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
@@ -72,13 +70,17 @@ extern rgblight_config_t rgblight_config;
extern void rgblight_layers_write(void);
extern void indicator_write(rgb_led_t *start_led, uint8_t num_leds);
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM);
indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
void led_update_ports(led_t led_state) {
rgblight_set_layer_state(0, led_state.caps_lock);
rgblight_set_layer_state(1, led_state.scroll_lock);

View File

@@ -1,4 +1,6 @@
RGBLIGHT_ENABLE = yes # Use RGB underglow light
RGBLIGHT_DRIVER = custom
WS2812_DRIVER_REQUIRED = yes
SRC += indicator.c led_driver.c

View File

@@ -1,27 +0,0 @@
/* Copyright 2023 eerraa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* BACKLIGHT PWM */
#define BACKLIGHT_PWM_DRIVER PWMD7
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
/* RGB Matrix */
#define RGB_MATRIX_DEFAULT_VAL 60
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_DISABLE_WHEN_USB_SUSPENDED

View File

@@ -1,21 +0,0 @@
/* Copyright 2023 eerraa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View File

@@ -1,590 +0,0 @@
{
"manufacturer": "SIRIND",
"keyboard_name": "Klein",
"maintainer": "eerraa",
"backlight": {
"levels": 5,
"pin": "GP15"
},
"bootloader": "rp2040",
"build": {
"debounce_type": "sym_defer_pk"
},
"diode_direction": "COL2ROW",
"features": {
"backlight": true,
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"indicators": {
"caps_lock": "GP16",
"on_state": 0,
"scroll_lock": "GP17"
},
"matrix_pins": {
"cols": ["GP22", "GP23", "GP24", "GP25", "GP26", "GP27", "GP28", "GP29", "GP11", "GP10", "GP8", "GP7", "GP1", "GP2", "GP3", "GP4"],
"rows": ["GP18", "GP19", "GP20", "GP21", "GP14", "GP5", "GP6", "GP9", "GP13", "GP12"]
},
"processor": "RP2040",
"rgb_matrix": {
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_rain": true,
"pixel_flow": true,
"pixel_fractal": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 7], "x": 4, "y": 0, "flags": 1},
{"matrix": [0, 6], "x": 20, "y": 2, "flags": 4},
{"matrix": [0, 5], "x": 32, "y": 2, "flags": 4},
{"matrix": [0, 4], "x": 45, "y": 1, "flags": 4},
{"matrix": [0, 3], "x": 58, "y": 3, "flags": 4},
{"matrix": [0, 2], "x": 71, "y": 5, "flags": 4},
{"matrix": [0, 1], "x": 83, "y": 8, "flags": 4},
{"matrix": [0, 0], "x": 96, "y": 10, "flags": 4},
{"matrix": [1, 0], "x": 129, "y": 9, "flags": 4},
{"matrix": [1, 1], "x": 141, "y": 7, "flags": 4},
{"matrix": [1, 2], "x": 154, "y": 4, "flags": 4},
{"matrix": [1, 3], "x": 166, "y": 2, "flags": 4},
{"matrix": [1, 4], "x": 179, "y": 1, "flags": 4},
{"matrix": [1, 5], "x": 192, "y": 2, "flags": 4},
{"matrix": [1, 6], "x": 211, "y": 2, "flags": 1},
{"matrix": [1, 7], "x": 1, "y": 13, "flags": 1},
{"matrix": [2, 6], "x": 21, "y": 15, "flags": 1},
{"matrix": [2, 5], "x": 36, "y": 15, "flags": 4},
{"matrix": [2, 4], "x": 50, "y": 15, "flags": 4},
{"matrix": [2, 3], "x": 62, "y": 17, "flags": 4},
{"matrix": [2, 2], "x": 75, "y": 20, "flags": 4},
{"matrix": [2, 1], "x": 87, "y": 22, "flags": 4},
{"matrix": [2, 0], "x": 100, "y": 24, "flags": 4},
{"matrix": [3, 1], "x": 125, "y": 23, "flags": 4},
{"matrix": [3, 2], "x": 137, "y": 21, "flags": 4},
{"matrix": [3, 3], "x": 150, "y": 18, "flags": 4},
{"matrix": [3, 4], "x": 162, "y": 16, "flags": 4},
{"matrix": [3, 5], "x": 175, "y": 15, "flags": 4},
{"matrix": [3, 6], "x": 188, "y": 15, "flags": 4},
{"matrix": [4, 6], "x": 201, "y": 15, "flags": 4},
{"matrix": [4, 5], "x": 217, "y": 15, "flags": 4},
{"matrix": [4, 3], "x": 0, "y": 27, "flags": 1},
{"matrix": [4, 1], "x": 18, "y": 29, "flags": 1},
{"matrix": [0, 8], "x": 38, "y": 29, "flags": 4},
{"matrix": [0, 9], "x": 51, "y": 29, "flags": 4},
{"matrix": [0, 10], "x": 64, "y": 31, "flags": 4},
{"matrix": [0, 11], "x": 76, "y": 33, "flags": 4},
{"matrix": [0, 12], "x": 89, "y": 36, "flags": 4},
{"matrix": [0, 13], "x": 129, "y": 36, "flags": 4},
{"matrix": [0, 15], "x": 142, "y": 33, "flags": 4},
{"matrix": [1, 15], "x": 154, "y": 31, "flags": 4},
{"matrix": [1, 14], "x": 167, "y": 29, "flags": 4},
{"matrix": [1, 13], "x": 180, "y": 29, "flags": 4},
{"matrix": [1, 12], "x": 193, "y": 29, "flags": 4},
{"matrix": [1, 11], "x": 213, "y": 29, "flags": 1},
{"matrix": [1, 10], "x": 21, "y": 42, "flags": 1},
{"matrix": [1, 9], "x": 42, "y": 42, "flags": 4},
{"matrix": [1, 8], "x": 60, "y": 57, "flags": 4},
{"matrix": [2, 8], "x": 67, "y": 45, "flags": 4},
{"matrix": [2, 9], "x": 80, "y": 47, "flags": 4},
{"matrix": [2, 10], "x": 92, "y": 50, "flags": 4},
{"matrix": [2, 11], "x": 126, "y": 50, "flags": 4},
{"matrix": [2, 12], "x": 138, "y": 48, "flags": 4},
{"matrix": [2, 13], "x": 151, "y": 45, "flags": 4},
{"matrix": [2, 15], "x": 163, "y": 43, "flags": 4},
{"matrix": [3, 14], "x": 177, "y": 42, "flags": 4},
{"matrix": [3, 13], "x": 189, "y": 42, "flags": 4},
{"matrix": [3, 12], "x": 213, "y": 42, "flags": 1},
{"matrix": [3, 11], "x": 16, "y": 55, "flags": 1},
{"matrix": [3, 10], "x": 55, "y": 43, "flags": 1},
{"matrix": [3, 9], "x": 76, "y": 60, "flags": 4},
{"matrix": [3, 8], "x": 96, "y": 64, "flags": 1},
{"matrix": [4, 9], "x": 139, "y": 61, "flags": 4},
{"matrix": [4, 11], "x": 166, "y": 57, "flags": 1},
{"matrix": [4, 13], "x": 189, "y": 55, "flags": 1},
{"matrix": [4, 14], "x": 202, "y": 55, "flags": 1},
{"matrix": [4, 15], "x": 221, "y": 55, "flags": 1}
],
"led_count": 67
},
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0003",
"vid": "0x4552"
},
"ws2812": {
"driver": "vendor",
"pin": "GP0"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 6], "x": 16.75, "y": 0},
{"matrix": [5, 7], "x": 17.75, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3, "w": 1.75},
{"matrix": [8, 7], "x": 17.75, "y": 3},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 5], "x": 15, "y": 4},
{"matrix": [9, 6], "x": 16, "y": 4},
{"matrix": [9, 7], "x": 17, "y": 4}
]
},
"LAYOUT_ansi": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 7], "x": 16.75, "y": 0, "w": 2},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3, "w": 2.75},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 7], "x": 17.25, "y": 4, "w": 1.5}
]
},
"LAYOUT_ansi_arrow": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 7], "x": 16.75, "y": 0, "w": 2},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3},
{"matrix": [8, 7], "x": 17, "y": 3, "w": 1.75},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 5], "x": 15, "y": 4},
{"matrix": [9, 6], "x": 16, "y": 4},
{"matrix": [9, 7], "x": 17, "y": 4}
]
},
"LAYOUT_ansi_split_bs": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 6], "x": 16.75, "y": 0},
{"matrix": [5, 7], "x": 17.75, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3, "w": 2.75},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 7], "x": 17.25, "y": 4, "w": 1.5}
]
},
"LAYOUT_ansi_split_bs_rsft": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 6], "x": 16.75, "y": 0},
{"matrix": [5, 7], "x": 17.75, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3, "w": 1.75},
{"matrix": [8, 7], "x": 17.75, "y": 3},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 7], "x": 17.25, "y": 4, "w": 1.5}
]
},
"LAYOUT_arrow_split_bs": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1.5, "y": 0},
{"matrix": [0, 2], "x": 2.5, "y": 0},
{"matrix": [0, 3], "x": 3.5, "y": 0},
{"matrix": [0, 4], "x": 4.5, "y": 0},
{"matrix": [0, 5], "x": 5.5, "y": 0},
{"matrix": [0, 6], "x": 6.5, "y": 0},
{"matrix": [0, 7], "x": 7.5, "y": 0},
{"matrix": [5, 0], "x": 10.75, "y": 0},
{"matrix": [5, 1], "x": 11.75, "y": 0},
{"matrix": [5, 2], "x": 12.75, "y": 0},
{"matrix": [5, 3], "x": 13.75, "y": 0},
{"matrix": [5, 4], "x": 14.75, "y": 0},
{"matrix": [5, 5], "x": 15.75, "y": 0},
{"matrix": [5, 6], "x": 16.75, "y": 0},
{"matrix": [5, 7], "x": 17.75, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1.5, "y": 1, "w": 1.5},
{"matrix": [1, 2], "x": 3, "y": 1},
{"matrix": [1, 3], "x": 4, "y": 1},
{"matrix": [1, 4], "x": 5, "y": 1},
{"matrix": [1, 5], "x": 6, "y": 1},
{"matrix": [1, 6], "x": 7, "y": 1},
{"matrix": [1, 7], "x": 8, "y": 1},
{"matrix": [6, 0], "x": 10.25, "y": 1},
{"matrix": [6, 1], "x": 11.25, "y": 1},
{"matrix": [6, 2], "x": 12.25, "y": 1},
{"matrix": [6, 3], "x": 13.25, "y": 1},
{"matrix": [6, 4], "x": 14.25, "y": 1},
{"matrix": [6, 5], "x": 15.25, "y": 1},
{"matrix": [6, 6], "x": 16.25, "y": 1},
{"matrix": [6, 7], "x": 17.25, "y": 1, "w": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1.5, "y": 2, "w": 1.75},
{"matrix": [2, 2], "x": 3.25, "y": 2},
{"matrix": [2, 3], "x": 4.25, "y": 2},
{"matrix": [2, 4], "x": 5.25, "y": 2},
{"matrix": [2, 5], "x": 6.25, "y": 2},
{"matrix": [2, 6], "x": 7.25, "y": 2},
{"matrix": [7, 0], "x": 10.5, "y": 2},
{"matrix": [7, 1], "x": 11.5, "y": 2},
{"matrix": [7, 2], "x": 12.5, "y": 2},
{"matrix": [7, 3], "x": 13.5, "y": 2},
{"matrix": [7, 4], "x": 14.5, "y": 2},
{"matrix": [7, 5], "x": 15.5, "y": 2},
{"matrix": [7, 7], "x": 16.5, "y": 2, "w": 2.25},
{"matrix": [3, 1], "x": 1.5, "y": 3, "w": 2.25},
{"matrix": [3, 2], "x": 3.75, "y": 3},
{"matrix": [3, 3], "x": 4.75, "y": 3},
{"matrix": [3, 4], "x": 5.75, "y": 3},
{"matrix": [3, 5], "x": 6.75, "y": 3},
{"matrix": [3, 6], "x": 7.75, "y": 3},
{"matrix": [8, 0], "x": 10, "y": 3},
{"matrix": [8, 1], "x": 11, "y": 3},
{"matrix": [8, 2], "x": 12, "y": 3},
{"matrix": [8, 3], "x": 13, "y": 3},
{"matrix": [8, 4], "x": 14, "y": 3},
{"matrix": [8, 5], "x": 15, "y": 3},
{"matrix": [8, 6], "x": 16, "y": 3},
{"matrix": [8, 7], "x": 17, "y": 3, "w": 1.75},
{"matrix": [4, 1], "x": 1.5, "y": 4},
{"matrix": [4, 3], "x": 4.5, "y": 4, "w": 1.5},
{"matrix": [4, 4], "x": 6, "y": 4, "w": 2.25},
{"matrix": [4, 5], "x": 8.25, "y": 4},
{"matrix": [9, 1], "x": 10, "y": 4, "w": 2.75},
{"matrix": [9, 3], "x": 12.75, "y": 4, "w": 1.5},
{"matrix": [9, 5], "x": 15, "y": 4},
{"matrix": [9, 6], "x": 16, "y": 4},
{"matrix": [9, 7], "x": 17, "y": 4}
]
}
}
}

View File

@@ -1,23 +0,0 @@
// Copyright 2018-2022 QMK (@qmk)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RCTL
),
[1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};

View File

@@ -1,23 +0,0 @@
// Copyright 2018-2022 QMK (@qmk)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RCTL
),
[1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};

View File

@@ -1,22 +0,0 @@
/* Copyright 2023 eerraa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include_next <mcuconf.h>
#undef RP_PWM_USE_PWM7
#define RP_PWM_USE_PWM7 TRUE

View File

@@ -1,23 +0,0 @@
# MontK Cervin Klein
* Keyboard Maintainer: [ERA](https://github.com/eerraa)
* Hardware supported: SIRIND Klein
* Hardware availability: [Syryan](https://srind.mysoho.com/)
Make example for this keyboard (after setting up your build environment):
make era/klein:default
Flashing example for this keyboard:
make era/klein:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at ESC(0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly short the `RESET` and `GND` pads on the SWD header twice, or short the `BOOT` header and plug in keyboard
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
# include "ergodox_ez.h"
# include "ws2812.h"
void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
void setleds_custom(rgb_led_t *led, uint16_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
int i = 0;
@@ -51,5 +52,8 @@ void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
ws2812_setleds(led, led_num);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif // RGBLIGHT_ENABLE

View File

@@ -2,5 +2,8 @@
"keyboard_name": "ErgoDox EZ Shine",
"usb": {
"pid": "0x4975"
},
"rgblight": {
"driver": "custom"
}
}

View File

@@ -1 +1,2 @@
RGBLIGHT_ENABLE = yes
WS2812_DRIVER_REQUIRED = yes

View File

@@ -1,19 +0,0 @@
/* Copyright 2019 Khader Syed
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -1,18 +0,0 @@
/* Copyright 2018 James Underwood
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Place overrides here

View File

@@ -1,18 +0,0 @@
/*
Copyright 2017 Danny Nguyen <danny@hexwire.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@@ -1,18 +0,0 @@
/*
Copyright 2017 Danny Nguyen <danny@hexwire.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View File

@@ -1,2 +0,0 @@
#pragma once

View File

@@ -1,2 +0,0 @@
#pragma once

View File

@@ -1,2 +0,0 @@
#pragma once

View File

@@ -1,4 +1,4 @@
/* Copyright 2019 Adam Newbold <adam@neatnik.net>
/* Copyright 2023 Yiancar-Designs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,7 +13,18 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#pragma once
void led_init_ports(void) {
// Set our LED pins as open drain outputs
setPinOutputOpenDrain(LED_CAPS_LOCK_PIN);
setPinOutputOpenDrain(LED_NUM_LOCK_PIN);
setPinOutputOpenDrain(LED_SCROLL_LOCK_PIN);
setPinOutputOpenDrain(LED_KANA_PIN);
setPinOutputOpenDrain(A14);
}
// place overrides here
layer_state_t layer_state_set_kb(layer_state_t state) {
writePin(A14, !layer_state_cmp(state, 1));
return layer_state_set_user(state);
}

View File

@@ -0,0 +1,499 @@
{
"manufacturer": "Yiancar-Designs",
"keyboard_name": "EE-AT",
"maintainer": "Yiancar-Designs",
"bootloader": "stm32-dfu",
"bootmagic": {
"matrix": [0, 2]
},
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"indicators": {
"caps_lock": "B6",
"kana": "A13",
"num_lock": "B3",
"on_state": 0,
"scroll_lock": "A15"
},
"matrix_pins": {
"cols": ["B7", "A0", "A1", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "B2", "B10", "B11", "B12", "B13", "B14", "B15", "A8", "A9", "A10"],
"rows": ["A2", "B9", "B8", "B5", "B4"]
},
"processor": "STM32F072",
"url": "https://yiancar-designs.com",
"usb": {
"device_version": "0.0.1",
"pid": "0x5755",
"vid": "0x8968"
},
"layouts": {
"LAYOUT_all": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2.25, "y": 0},
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [0, 6], "x": 6.25, "y": 0},
{"matrix": [0, 7], "x": 7.25, "y": 0},
{"matrix": [0, 8], "x": 8.25, "y": 0},
{"matrix": [0, 9], "x": 9.25, "y": 0},
{"matrix": [0, 10], "x": 10.25, "y": 0},
{"matrix": [0, 11], "x": 11.25, "y": 0},
{"matrix": [0, 12], "x": 12.25, "y": 0},
{"matrix": [0, 13], "x": 13.25, "y": 0},
{"matrix": [0, 14], "x": 14.25, "y": 0},
{"matrix": [0, 15], "x": 15.25, "y": 0},
{"matrix": [2, 14], "x": 16.25, "y": 0},
{"matrix": [0, 16], "x": 17.5, "y": 0},
{"matrix": [0, 17], "x": 18.5, "y": 0},
{"matrix": [0, 18], "x": 19.5, "y": 0},
{"matrix": [0, 19], "x": 20.5, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"matrix": [1, 3], "x": 3.75, "y": 1},
{"matrix": [1, 4], "x": 4.75, "y": 1},
{"matrix": [1, 5], "x": 5.75, "y": 1},
{"matrix": [1, 6], "x": 6.75, "y": 1},
{"matrix": [1, 7], "x": 7.75, "y": 1},
{"matrix": [1, 8], "x": 8.75, "y": 1},
{"matrix": [1, 9], "x": 9.75, "y": 1},
{"matrix": [1, 10], "x": 10.75, "y": 1},
{"matrix": [1, 11], "x": 11.75, "y": 1},
{"matrix": [1, 12], "x": 12.75, "y": 1},
{"matrix": [1, 13], "x": 13.75, "y": 1},
{"matrix": [1, 14], "x": 14.75, "y": 1},
{"matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"matrix": [1, 16], "x": 17.5, "y": 1},
{"matrix": [1, 17], "x": 18.5, "y": 1},
{"matrix": [1, 18], "x": 19.5, "y": 1},
{"matrix": [1, 19], "x": 20.5, "y": 1, "h": 2},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"matrix": [2, 3], "x": 4, "y": 2},
{"matrix": [2, 4], "x": 5, "y": 2},
{"matrix": [2, 5], "x": 6, "y": 2},
{"matrix": [2, 6], "x": 7, "y": 2},
{"matrix": [2, 7], "x": 8, "y": 2},
{"matrix": [2, 8], "x": 9, "y": 2},
{"matrix": [2, 9], "x": 10, "y": 2},
{"matrix": [2, 10], "x": 11, "y": 2},
{"matrix": [2, 11], "x": 12, "y": 2},
{"matrix": [2, 12], "x": 13, "y": 2},
{"matrix": [2, 13], "x": 14, "y": 2},
{"matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"matrix": [2, 16], "x": 17.5, "y": 2},
{"matrix": [2, 17], "x": 18.5, "y": 2},
{"matrix": [2, 18], "x": 19.5, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"matrix": [3, 4], "x": 4.5, "y": 3},
{"matrix": [3, 5], "x": 5.5, "y": 3},
{"matrix": [3, 6], "x": 6.5, "y": 3},
{"matrix": [3, 7], "x": 7.5, "y": 3},
{"matrix": [3, 8], "x": 8.5, "y": 3},
{"matrix": [3, 9], "x": 9.5, "y": 3},
{"matrix": [3, 10], "x": 10.5, "y": 3},
{"matrix": [3, 11], "x": 11.5, "y": 3},
{"matrix": [3, 12], "x": 12.5, "y": 3},
{"matrix": [3, 13], "x": 13.5, "y": 3},
{"matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"matrix": [3, 15], "x": 16.25, "y": 3},
{"matrix": [3, 16], "x": 17.5, "y": 3},
{"matrix": [3, 17], "x": 18.5, "y": 3},
{"matrix": [3, 18], "x": 19.5, "y": 3},
{"matrix": [4, 19], "x": 20.5, "y": 3, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"matrix": [4, 3], "x": 3.75, "y": 4},
{"matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"matrix": [4, 14], "x": 14.75, "y": 4},
{"matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"matrix": [4, 16], "x": 17.5, "y": 4, "w": 2},
{"matrix": [4, 18], "x": 19.5, "y": 4}
]
},
"LAYOUT_ansi": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2.25, "y": 0},
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [0, 6], "x": 6.25, "y": 0},
{"matrix": [0, 7], "x": 7.25, "y": 0},
{"matrix": [0, 8], "x": 8.25, "y": 0},
{"matrix": [0, 9], "x": 9.25, "y": 0},
{"matrix": [0, 10], "x": 10.25, "y": 0},
{"matrix": [0, 11], "x": 11.25, "y": 0},
{"matrix": [0, 12], "x": 12.25, "y": 0},
{"matrix": [0, 13], "x": 13.25, "y": 0},
{"matrix": [0, 14], "x": 14.25, "y": 0},
{"matrix": [0, 15], "x": 15.25, "y": 0, "w": 2},
{"matrix": [0, 16], "x": 17.5, "y": 0},
{"matrix": [0, 17], "x": 18.5, "y": 0},
{"matrix": [0, 18], "x": 19.5, "y": 0},
{"matrix": [0, 19], "x": 20.5, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"matrix": [1, 3], "x": 3.75, "y": 1},
{"matrix": [1, 4], "x": 4.75, "y": 1},
{"matrix": [1, 5], "x": 5.75, "y": 1},
{"matrix": [1, 6], "x": 6.75, "y": 1},
{"matrix": [1, 7], "x": 7.75, "y": 1},
{"matrix": [1, 8], "x": 8.75, "y": 1},
{"matrix": [1, 9], "x": 9.75, "y": 1},
{"matrix": [1, 10], "x": 10.75, "y": 1},
{"matrix": [1, 11], "x": 11.75, "y": 1},
{"matrix": [1, 12], "x": 12.75, "y": 1},
{"matrix": [1, 13], "x": 13.75, "y": 1},
{"matrix": [1, 14], "x": 14.75, "y": 1},
{"matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"matrix": [1, 16], "x": 17.5, "y": 1},
{"matrix": [1, 17], "x": 18.5, "y": 1},
{"matrix": [1, 18], "x": 19.5, "y": 1},
{"matrix": [1, 19], "x": 20.5, "y": 1, "h": 2},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"matrix": [2, 3], "x": 4, "y": 2},
{"matrix": [2, 4], "x": 5, "y": 2},
{"matrix": [2, 5], "x": 6, "y": 2},
{"matrix": [2, 6], "x": 7, "y": 2},
{"matrix": [2, 7], "x": 8, "y": 2},
{"matrix": [2, 8], "x": 9, "y": 2},
{"matrix": [2, 9], "x": 10, "y": 2},
{"matrix": [2, 10], "x": 11, "y": 2},
{"matrix": [2, 11], "x": 12, "y": 2},
{"matrix": [2, 12], "x": 13, "y": 2},
{"matrix": [2, 13], "x": 14, "y": 2},
{"matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"matrix": [2, 16], "x": 17.5, "y": 2},
{"matrix": [2, 17], "x": 18.5, "y": 2},
{"matrix": [2, 18], "x": 19.5, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"matrix": [3, 4], "x": 4.5, "y": 3},
{"matrix": [3, 5], "x": 5.5, "y": 3},
{"matrix": [3, 6], "x": 6.5, "y": 3},
{"matrix": [3, 7], "x": 7.5, "y": 3},
{"matrix": [3, 8], "x": 8.5, "y": 3},
{"matrix": [3, 9], "x": 9.5, "y": 3},
{"matrix": [3, 10], "x": 10.5, "y": 3},
{"matrix": [3, 11], "x": 11.5, "y": 3},
{"matrix": [3, 12], "x": 12.5, "y": 3},
{"matrix": [3, 13], "x": 13.5, "y": 3},
{"matrix": [3, 14], "x": 14.5, "y": 3, "w": 2.75},
{"matrix": [3, 16], "x": 17.5, "y": 3},
{"matrix": [3, 17], "x": 18.5, "y": 3},
{"matrix": [3, 18], "x": 19.5, "y": 3},
{"matrix": [4, 19], "x": 20.5, "y": 3, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"matrix": [4, 3], "x": 3.75, "y": 4},
{"matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"matrix": [4, 14], "x": 14.75, "y": 4},
{"matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"matrix": [4, 16], "x": 17.5, "y": 4, "w": 2},
{"matrix": [4, 18], "x": 19.5, "y": 4}
]
},
"LAYOUT_ansi_split_bs": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2.25, "y": 0},
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [0, 6], "x": 6.25, "y": 0},
{"matrix": [0, 7], "x": 7.25, "y": 0},
{"matrix": [0, 8], "x": 8.25, "y": 0},
{"matrix": [0, 9], "x": 9.25, "y": 0},
{"matrix": [0, 10], "x": 10.25, "y": 0},
{"matrix": [0, 11], "x": 11.25, "y": 0},
{"matrix": [0, 12], "x": 12.25, "y": 0},
{"matrix": [0, 13], "x": 13.25, "y": 0},
{"matrix": [0, 14], "x": 14.25, "y": 0},
{"matrix": [0, 15], "x": 15.25, "y": 0},
{"matrix": [2, 14], "x": 16.25, "y": 0},
{"matrix": [0, 16], "x": 17.5, "y": 0},
{"matrix": [0, 17], "x": 18.5, "y": 0},
{"matrix": [0, 18], "x": 19.5, "y": 0},
{"matrix": [0, 19], "x": 20.5, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"matrix": [1, 3], "x": 3.75, "y": 1},
{"matrix": [1, 4], "x": 4.75, "y": 1},
{"matrix": [1, 5], "x": 5.75, "y": 1},
{"matrix": [1, 6], "x": 6.75, "y": 1},
{"matrix": [1, 7], "x": 7.75, "y": 1},
{"matrix": [1, 8], "x": 8.75, "y": 1},
{"matrix": [1, 9], "x": 9.75, "y": 1},
{"matrix": [1, 10], "x": 10.75, "y": 1},
{"matrix": [1, 11], "x": 11.75, "y": 1},
{"matrix": [1, 12], "x": 12.75, "y": 1},
{"matrix": [1, 13], "x": 13.75, "y": 1},
{"matrix": [1, 14], "x": 14.75, "y": 1},
{"matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"matrix": [1, 16], "x": 17.5, "y": 1},
{"matrix": [1, 17], "x": 18.5, "y": 1},
{"matrix": [1, 18], "x": 19.5, "y": 1},
{"matrix": [1, 19], "x": 20.5, "y": 1, "h": 2},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"matrix": [2, 3], "x": 4, "y": 2},
{"matrix": [2, 4], "x": 5, "y": 2},
{"matrix": [2, 5], "x": 6, "y": 2},
{"matrix": [2, 6], "x": 7, "y": 2},
{"matrix": [2, 7], "x": 8, "y": 2},
{"matrix": [2, 8], "x": 9, "y": 2},
{"matrix": [2, 9], "x": 10, "y": 2},
{"matrix": [2, 10], "x": 11, "y": 2},
{"matrix": [2, 11], "x": 12, "y": 2},
{"matrix": [2, 12], "x": 13, "y": 2},
{"matrix": [2, 13], "x": 14, "y": 2},
{"matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"matrix": [2, 16], "x": 17.5, "y": 2},
{"matrix": [2, 17], "x": 18.5, "y": 2},
{"matrix": [2, 18], "x": 19.5, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"matrix": [3, 4], "x": 4.5, "y": 3},
{"matrix": [3, 5], "x": 5.5, "y": 3},
{"matrix": [3, 6], "x": 6.5, "y": 3},
{"matrix": [3, 7], "x": 7.5, "y": 3},
{"matrix": [3, 8], "x": 8.5, "y": 3},
{"matrix": [3, 9], "x": 9.5, "y": 3},
{"matrix": [3, 10], "x": 10.5, "y": 3},
{"matrix": [3, 11], "x": 11.5, "y": 3},
{"matrix": [3, 12], "x": 12.5, "y": 3},
{"matrix": [3, 13], "x": 13.5, "y": 3},
{"matrix": [3, 14], "x": 14.5, "y": 3, "w": 2.75},
{"matrix": [3, 16], "x": 17.5, "y": 3},
{"matrix": [3, 17], "x": 18.5, "y": 3},
{"matrix": [3, 18], "x": 19.5, "y": 3},
{"matrix": [4, 19], "x": 20.5, "y": 3, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"matrix": [4, 3], "x": 3.75, "y": 4},
{"matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"matrix": [4, 14], "x": 14.75, "y": 4},
{"matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"matrix": [4, 16], "x": 17.5, "y": 4, "w": 2},
{"matrix": [4, 18], "x": 19.5, "y": 4}
]
},
"LAYOUT_ansi_split_bs_rshift": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2.25, "y": 0},
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [0, 6], "x": 6.25, "y": 0},
{"matrix": [0, 7], "x": 7.25, "y": 0},
{"matrix": [0, 8], "x": 8.25, "y": 0},
{"matrix": [0, 9], "x": 9.25, "y": 0},
{"matrix": [0, 10], "x": 10.25, "y": 0},
{"matrix": [0, 11], "x": 11.25, "y": 0},
{"matrix": [0, 12], "x": 12.25, "y": 0},
{"matrix": [0, 13], "x": 13.25, "y": 0},
{"matrix": [0, 14], "x": 14.25, "y": 0},
{"matrix": [0, 15], "x": 15.25, "y": 0},
{"matrix": [2, 14], "x": 16.25, "y": 0},
{"matrix": [0, 16], "x": 17.5, "y": 0},
{"matrix": [0, 17], "x": 18.5, "y": 0},
{"matrix": [0, 18], "x": 19.5, "y": 0},
{"matrix": [0, 19], "x": 20.5, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"matrix": [1, 3], "x": 3.75, "y": 1},
{"matrix": [1, 4], "x": 4.75, "y": 1},
{"matrix": [1, 5], "x": 5.75, "y": 1},
{"matrix": [1, 6], "x": 6.75, "y": 1},
{"matrix": [1, 7], "x": 7.75, "y": 1},
{"matrix": [1, 8], "x": 8.75, "y": 1},
{"matrix": [1, 9], "x": 9.75, "y": 1},
{"matrix": [1, 10], "x": 10.75, "y": 1},
{"matrix": [1, 11], "x": 11.75, "y": 1},
{"matrix": [1, 12], "x": 12.75, "y": 1},
{"matrix": [1, 13], "x": 13.75, "y": 1},
{"matrix": [1, 14], "x": 14.75, "y": 1},
{"matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"matrix": [1, 16], "x": 17.5, "y": 1},
{"matrix": [1, 17], "x": 18.5, "y": 1},
{"matrix": [1, 18], "x": 19.5, "y": 1},
{"matrix": [1, 19], "x": 20.5, "y": 1, "h": 2},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"matrix": [2, 3], "x": 4, "y": 2},
{"matrix": [2, 4], "x": 5, "y": 2},
{"matrix": [2, 5], "x": 6, "y": 2},
{"matrix": [2, 6], "x": 7, "y": 2},
{"matrix": [2, 7], "x": 8, "y": 2},
{"matrix": [2, 8], "x": 9, "y": 2},
{"matrix": [2, 9], "x": 10, "y": 2},
{"matrix": [2, 10], "x": 11, "y": 2},
{"matrix": [2, 11], "x": 12, "y": 2},
{"matrix": [2, 12], "x": 13, "y": 2},
{"matrix": [2, 13], "x": 14, "y": 2},
{"matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"matrix": [2, 16], "x": 17.5, "y": 2},
{"matrix": [2, 17], "x": 18.5, "y": 2},
{"matrix": [2, 18], "x": 19.5, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"matrix": [3, 4], "x": 4.5, "y": 3},
{"matrix": [3, 5], "x": 5.5, "y": 3},
{"matrix": [3, 6], "x": 6.5, "y": 3},
{"matrix": [3, 7], "x": 7.5, "y": 3},
{"matrix": [3, 8], "x": 8.5, "y": 3},
{"matrix": [3, 9], "x": 9.5, "y": 3},
{"matrix": [3, 10], "x": 10.5, "y": 3},
{"matrix": [3, 11], "x": 11.5, "y": 3},
{"matrix": [3, 12], "x": 12.5, "y": 3},
{"matrix": [3, 13], "x": 13.5, "y": 3},
{"matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"matrix": [3, 15], "x": 16.25, "y": 3},
{"matrix": [3, 16], "x": 17.5, "y": 3},
{"matrix": [3, 17], "x": 18.5, "y": 3},
{"matrix": [3, 18], "x": 19.5, "y": 3},
{"matrix": [4, 19], "x": 20.5, "y": 3, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"matrix": [4, 3], "x": 3.75, "y": 4},
{"matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"matrix": [4, 14], "x": 14.75, "y": 4},
{"matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"matrix": [4, 16], "x": 17.5, "y": 4, "w": 2},
{"matrix": [4, 18], "x": 19.5, "y": 4}
]
},
"LAYOUT_ansi_split_rshift": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2.25, "y": 0},
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [0, 6], "x": 6.25, "y": 0},
{"matrix": [0, 7], "x": 7.25, "y": 0},
{"matrix": [0, 8], "x": 8.25, "y": 0},
{"matrix": [0, 9], "x": 9.25, "y": 0},
{"matrix": [0, 10], "x": 10.25, "y": 0},
{"matrix": [0, 11], "x": 11.25, "y": 0},
{"matrix": [0, 12], "x": 12.25, "y": 0},
{"matrix": [0, 13], "x": 13.25, "y": 0},
{"matrix": [0, 14], "x": 14.25, "y": 0},
{"matrix": [0, 15], "x": 15.25, "y": 0, "w": 2},
{"matrix": [0, 16], "x": 17.5, "y": 0},
{"matrix": [0, 17], "x": 18.5, "y": 0},
{"matrix": [0, 18], "x": 19.5, "y": 0},
{"matrix": [0, 19], "x": 20.5, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"matrix": [1, 3], "x": 3.75, "y": 1},
{"matrix": [1, 4], "x": 4.75, "y": 1},
{"matrix": [1, 5], "x": 5.75, "y": 1},
{"matrix": [1, 6], "x": 6.75, "y": 1},
{"matrix": [1, 7], "x": 7.75, "y": 1},
{"matrix": [1, 8], "x": 8.75, "y": 1},
{"matrix": [1, 9], "x": 9.75, "y": 1},
{"matrix": [1, 10], "x": 10.75, "y": 1},
{"matrix": [1, 11], "x": 11.75, "y": 1},
{"matrix": [1, 12], "x": 12.75, "y": 1},
{"matrix": [1, 13], "x": 13.75, "y": 1},
{"matrix": [1, 14], "x": 14.75, "y": 1},
{"matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"matrix": [1, 16], "x": 17.5, "y": 1},
{"matrix": [1, 17], "x": 18.5, "y": 1},
{"matrix": [1, 18], "x": 19.5, "y": 1},
{"matrix": [1, 19], "x": 20.5, "y": 1, "h": 2},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"matrix": [2, 3], "x": 4, "y": 2},
{"matrix": [2, 4], "x": 5, "y": 2},
{"matrix": [2, 5], "x": 6, "y": 2},
{"matrix": [2, 6], "x": 7, "y": 2},
{"matrix": [2, 7], "x": 8, "y": 2},
{"matrix": [2, 8], "x": 9, "y": 2},
{"matrix": [2, 9], "x": 10, "y": 2},
{"matrix": [2, 10], "x": 11, "y": 2},
{"matrix": [2, 11], "x": 12, "y": 2},
{"matrix": [2, 12], "x": 13, "y": 2},
{"matrix": [2, 13], "x": 14, "y": 2},
{"matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"matrix": [2, 16], "x": 17.5, "y": 2},
{"matrix": [2, 17], "x": 18.5, "y": 2},
{"matrix": [2, 18], "x": 19.5, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"matrix": [3, 4], "x": 4.5, "y": 3},
{"matrix": [3, 5], "x": 5.5, "y": 3},
{"matrix": [3, 6], "x": 6.5, "y": 3},
{"matrix": [3, 7], "x": 7.5, "y": 3},
{"matrix": [3, 8], "x": 8.5, "y": 3},
{"matrix": [3, 9], "x": 9.5, "y": 3},
{"matrix": [3, 10], "x": 10.5, "y": 3},
{"matrix": [3, 11], "x": 11.5, "y": 3},
{"matrix": [3, 12], "x": 12.5, "y": 3},
{"matrix": [3, 13], "x": 13.5, "y": 3},
{"matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"matrix": [3, 15], "x": 16.25, "y": 3},
{"matrix": [3, 16], "x": 17.5, "y": 3},
{"matrix": [3, 17], "x": 18.5, "y": 3},
{"matrix": [3, 18], "x": 19.5, "y": 3},
{"matrix": [4, 19], "x": 20.5, "y": 3, "h": 2},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"matrix": [4, 3], "x": 3.75, "y": 4},
{"matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"matrix": [4, 14], "x": 14.75, "y": 4},
{"matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"matrix": [4, 16], "x": 17.5, "y": 4, "w": 2},
{"matrix": [4, 18], "x": 19.5, "y": 4}
]
}
}
}

View File

@@ -0,0 +1,32 @@
/* Copyright 2023 Yiancar-Designs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_F1, KC_F2, QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NUM, KC_PMNS, KC_PSLS, KC_PAST,
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_P1, KC_P2, KC_P3, KC_PENT,
KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_P0, KC_PDOT),
[1] = LAYOUT_all( /* FN */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

View File

@@ -0,0 +1,32 @@
/* Copyright 2023 Yiancar-Designs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_F1, KC_F2, QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NUM, KC_PMNS, KC_PSLS, KC_PAST,
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_P1, KC_P2, KC_P3, KC_PENT,
KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_P0, KC_PDOT),
[1] = LAYOUT_all( /* FN */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

View File

@@ -0,0 +1,21 @@
# Matrix Diagram for Yiancar-Designs EE-AT
```
┌───────┐
2u Backspace │0F │
└───────┘
┌───┬───┐┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐┌───┬───┬───┬───┐
│00 │01 ││02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │0F │2E ││0G │0H │0I │0J │
├───┼───┤├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤├───┼───┼───┼───┤
│10 │11 ││12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1E │1F ││1G │1H │1I │ │
├───┼───┤├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤├───┼───┼───┤1J │
│20 │21 ││22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │2F ││2G │2H │2I │ │
├───┼───┤├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤├───┼───┼───┼───┤
│30 │31 ││32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │3F ││3G │3H │3I │ │
├───┼───┤├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤├───┼───┼───┤4J │
│40 │41 ││42 │43 │44 │48 │4D │4E │4F ││4G │4H │4I │ │
└───┴───┘└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘└───┴───┴───┴───┘
┌──────────┐
2.75u RShift │3E │
└──────────┘
```

View File

@@ -0,0 +1,32 @@
# EE-AT
This is a standard weird layout PCB, now with Hotswap. It supports VIA.
* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar)
* Hardware Supported: A keyboard with STM32F072CB
* Hardware Availability: https://geon.works/
## Instructions
### Build
Make example for this keyboard (after setting up your build environment):
make geonworks/ee_at:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
### Reset
- Unplug
- Hold Escape
- Plug In
- Unplug
- Release Escape
### Flash
- Unplug
- Hold Escape
- Plug In
- Flash using QMK Toolbox or CLI (`make geonworks/ee_at:<keymap>:flash`)

View File

@@ -0,0 +1,2 @@
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF

View File

@@ -1,36 +1,43 @@
{
"keyboard_name": "W1-AT",
"manufacturer": "Yiancar-Designs",
"url": "https://yiancar-designs.com",
"keyboard_name": "W1-AT",
"maintainer": "Yiancar-Designs",
"usb": {
"vid": "0x8968",
"pid": "0x5754",
"device_version": "0.0.1"
"bootloader": "stm32-dfu",
"bootmagic": {
"matrix": [0, 2]
},
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"indicators": {
"caps_lock": "B6",
"kana": "A13",
"num_lock": "B3",
"on_state": 0,
"scroll_lock": "A15"
},
"matrix_pins": {
"cols": ["B7", "A0", "A1", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "B2", "B10", "B11", "B12", "B13", "B14", "B15", "A8", "A9", "A10"],
"rows": ["A2", "B9", "B8", "B5", "B4"]
},
"diode_direction": "COL2ROW",
"indicators": {
"caps_lock": "B6",
"num_lock": "B3",
"scroll_lock": "A15",
"kana": "A13",
"on_state": 0
},
"bootmagic": {
"matrix": [0, 2]
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"url": "https://yiancar-designs.com",
"usb": {
"device_version": "0.0.1",
"pid": "0x5754",
"vid": "0x8968"
},
"layouts": {
"LAYOUT_all": {
"layout": [
{"label": "F1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Esc", "matrix": [0, 2], "x": 2.25, "y": 0},
{"label": "1", "matrix": [0, 3], "x": 3.25, "y": 0},
{"label": "2", "matrix": [0, 4], "x": 4.25, "y": 0},
@@ -46,15 +53,12 @@
{"label": "=", "matrix": [0, 14], "x": 14.25, "y": 0},
{"label": "Backspace", "matrix": [0, 15], "x": 15.25, "y": 0},
{"label": "Delete", "matrix": [2, 14], "x": 16.25, "y": 0},
{"label": "Num Lock", "matrix": [0, 16], "x": 17.5, "y": 0},
{"label": "-", "matrix": [0, 17], "x": 18.5, "y": 0},
{"label": "/", "matrix": [0, 18], "x": 19.5, "y": 0},
{"label": "*", "matrix": [0, 19], "x": 20.5, "y": 0},
{"label": "F3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "F4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "Tab", "matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"label": "Q", "matrix": [1, 3], "x": 3.75, "y": 1},
{"label": "W", "matrix": [1, 4], "x": 4.75, "y": 1},
@@ -69,15 +73,12 @@
{"label": "[", "matrix": [1, 13], "x": 13.75, "y": 1},
{"label": "]", "matrix": [1, 14], "x": 14.75, "y": 1},
{"label": "\\", "matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"label": "7", "matrix": [1, 16], "x": 17.5, "y": 1},
{"label": "8", "matrix": [1, 17], "x": 18.5, "y": 1},
{"label": "9", "matrix": [1, 18], "x": 19.5, "y": 1},
{"label": "+", "matrix": [1, 19], "x": 20.5, "y": 1},
{"label": "F5", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "F6", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "Caps Lock", "matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"label": "A", "matrix": [2, 3], "x": 4, "y": 2},
{"label": "S", "matrix": [2, 4], "x": 5, "y": 2},
@@ -91,15 +92,12 @@
{"label": ";", "matrix": [2, 12], "x": 13, "y": 2},
{"label": "'", "matrix": [2, 13], "x": 14, "y": 2},
{"label": "Enter", "matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"label": "4", "matrix": [2, 16], "x": 17.5, "y": 2},
{"label": "5", "matrix": [2, 17], "x": 18.5, "y": 2},
{"label": "6", "matrix": [2, 18], "x": 19.5, "y": 2},
{"label": "-", "matrix": [2, 19], "x": 20.5, "y": 2},
{"label": "F7", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "F8", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Shift", "matrix": [3, 2], "x": 2.25, "y": 3, "w": 1.25},
{"label": "\\", "matrix": [3, 3], "x": 3.5, "y": 3},
{"label": "Z", "matrix": [3, 4], "x": 4.5, "y": 3},
@@ -114,21 +112,17 @@
{"label": "/", "matrix": [3, 13], "x": 13.5, "y": 3},
{"label": "Shift", "matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"label": "Fn", "matrix": [3, 15], "x": 16.25, "y": 3},
{"label": "1", "matrix": [3, 16], "x": 17.5, "y": 3},
{"label": "2", "matrix": [3, 17], "x": 18.5, "y": 3},
{"label": "3", "matrix": [3, 18], "x": 19.5, "y": 3},
{"label": "-", "matrix": [3, 19], "x": 20.5, "y": 3},
{"label": "F9", "matrix": [4, 0], "x": 0, "y": 4},
{"label": "F10", "matrix": [4, 1], "x": 1, "y": 4},
{"label": "Ctrl", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"label": "Alt", "matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"label": "Space", "matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"label": "Alt", "matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"label": "Ctrl", "matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"label": "0", "matrix": [4, 16], "x": 17.5, "y": 4},
{"label": "00", "matrix": [4, 17], "x": 18.5, "y": 4},
{"label": ".", "matrix": [4, 18], "x": 19.5, "y": 4},
@@ -139,7 +133,6 @@
"layout": [
{"label": "F1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Esc", "matrix": [0, 2], "x": 2.25, "y": 0},
{"label": "1", "matrix": [0, 3], "x": 3.25, "y": 0},
{"label": "2", "matrix": [0, 4], "x": 4.25, "y": 0},
@@ -154,15 +147,12 @@
{"label": "-", "matrix": [0, 13], "x": 13.25, "y": 0},
{"label": "=", "matrix": [0, 14], "x": 14.25, "y": 0},
{"label": "Backspace", "matrix": [0, 15], "x": 15.25, "y": 0, "w": 2},
{"label": "Num Lock", "matrix": [0, 16], "x": 17.5, "y": 0},
{"label": "-", "matrix": [0, 17], "x": 18.5, "y": 0},
{"label": "/", "matrix": [0, 18], "x": 19.5, "y": 0},
{"label": "*", "matrix": [0, 19], "x": 20.5, "y": 0},
{"label": "F3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "F4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "Tab", "matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"label": "Q", "matrix": [1, 3], "x": 3.75, "y": 1},
{"label": "W", "matrix": [1, 4], "x": 4.75, "y": 1},
@@ -177,15 +167,12 @@
{"label": "[", "matrix": [1, 13], "x": 13.75, "y": 1},
{"label": "]", "matrix": [1, 14], "x": 14.75, "y": 1},
{"label": "\\", "matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"label": "7", "matrix": [1, 16], "x": 17.5, "y": 1},
{"label": "8", "matrix": [1, 17], "x": 18.5, "y": 1},
{"label": "9", "matrix": [1, 18], "x": 19.5, "y": 1},
{"label": "+", "matrix": [1, 19], "x": 20.5, "y": 1},
{"label": "F5", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "F6", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "Caps Lock", "matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"label": "A", "matrix": [2, 3], "x": 4, "y": 2},
{"label": "S", "matrix": [2, 4], "x": 5, "y": 2},
@@ -199,15 +186,12 @@
{"label": ";", "matrix": [2, 12], "x": 13, "y": 2},
{"label": "'", "matrix": [2, 13], "x": 14, "y": 2},
{"label": "Enter", "matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"label": "4", "matrix": [2, 16], "x": 17.5, "y": 2},
{"label": "5", "matrix": [2, 17], "x": 18.5, "y": 2},
{"label": "6", "matrix": [2, 18], "x": 19.5, "y": 2},
{"label": "-", "matrix": [2, 19], "x": 20.5, "y": 2},
{"label": "F7", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "F8", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Shift", "matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"label": "Z", "matrix": [3, 4], "x": 4.5, "y": 3},
{"label": "X", "matrix": [3, 5], "x": 5.5, "y": 3},
@@ -220,21 +204,17 @@
{"label": ".", "matrix": [3, 12], "x": 12.5, "y": 3},
{"label": "/", "matrix": [3, 13], "x": 13.5, "y": 3},
{"label": "Shift", "matrix": [3, 14], "x": 14.5, "y": 3, "w": 2.75},
{"label": "1", "matrix": [3, 16], "x": 17.5, "y": 3},
{"label": "2", "matrix": [3, 17], "x": 18.5, "y": 3},
{"label": "3", "matrix": [3, 18], "x": 19.5, "y": 3},
{"label": "-", "matrix": [3, 19], "x": 20.5, "y": 3},
{"label": "F9", "matrix": [4, 0], "x": 0, "y": 4},
{"label": "F10", "matrix": [4, 1], "x": 1, "y": 4},
{"label": "Ctrl", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"label": "Alt", "matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"label": "Space", "matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"label": "Alt", "matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"label": "Ctrl", "matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"label": "0", "matrix": [4, 16], "x": 17.5, "y": 4},
{"label": "00", "matrix": [4, 17], "x": 18.5, "y": 4},
{"label": ".", "matrix": [4, 18], "x": 19.5, "y": 4},
@@ -245,7 +225,6 @@
"layout": [
{"label": "F1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Esc", "matrix": [0, 2], "x": 2.25, "y": 0},
{"label": "1", "matrix": [0, 3], "x": 3.25, "y": 0},
{"label": "2", "matrix": [0, 4], "x": 4.25, "y": 0},
@@ -261,15 +240,12 @@
{"label": "=", "matrix": [0, 14], "x": 14.25, "y": 0},
{"label": "Backspace", "matrix": [0, 15], "x": 15.25, "y": 0},
{"label": "Delete", "matrix": [2, 14], "x": 16.25, "y": 0},
{"label": "Num Lock", "matrix": [0, 16], "x": 17.5, "y": 0},
{"label": "-", "matrix": [0, 17], "x": 18.5, "y": 0},
{"label": "/", "matrix": [0, 18], "x": 19.5, "y": 0},
{"label": "*", "matrix": [0, 19], "x": 20.5, "y": 0},
{"label": "F3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "F4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "Tab", "matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"label": "Q", "matrix": [1, 3], "x": 3.75, "y": 1},
{"label": "W", "matrix": [1, 4], "x": 4.75, "y": 1},
@@ -284,15 +260,12 @@
{"label": "[", "matrix": [1, 13], "x": 13.75, "y": 1},
{"label": "]", "matrix": [1, 14], "x": 14.75, "y": 1},
{"label": "\\", "matrix": [1, 15], "x": 15.75, "y": 1, "w": 1.5},
{"label": "7", "matrix": [1, 16], "x": 17.5, "y": 1},
{"label": "8", "matrix": [1, 17], "x": 18.5, "y": 1},
{"label": "9", "matrix": [1, 18], "x": 19.5, "y": 1},
{"label": "+", "matrix": [1, 19], "x": 20.5, "y": 1},
{"label": "F5", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "F6", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "Caps Lock", "matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"label": "A", "matrix": [2, 3], "x": 4, "y": 2},
{"label": "S", "matrix": [2, 4], "x": 5, "y": 2},
@@ -306,15 +279,12 @@
{"label": ";", "matrix": [2, 12], "x": 13, "y": 2},
{"label": "'", "matrix": [2, 13], "x": 14, "y": 2},
{"label": "Enter", "matrix": [2, 15], "x": 15, "y": 2, "w": 2.25},
{"label": "4", "matrix": [2, 16], "x": 17.5, "y": 2},
{"label": "5", "matrix": [2, 17], "x": 18.5, "y": 2},
{"label": "6", "matrix": [2, 18], "x": 19.5, "y": 2},
{"label": "-", "matrix": [2, 19], "x": 20.5, "y": 2},
{"label": "F7", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "F8", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Shift", "matrix": [3, 2], "x": 2.25, "y": 3, "w": 2.25},
{"label": "Z", "matrix": [3, 4], "x": 4.5, "y": 3},
{"label": "X", "matrix": [3, 5], "x": 5.5, "y": 3},
@@ -328,21 +298,17 @@
{"label": "/", "matrix": [3, 13], "x": 13.5, "y": 3},
{"label": "Shift", "matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"label": "Fn", "matrix": [3, 15], "x": 16.25, "y": 3},
{"label": "1", "matrix": [3, 16], "x": 17.5, "y": 3},
{"label": "2", "matrix": [3, 17], "x": 18.5, "y": 3},
{"label": "3", "matrix": [3, 18], "x": 19.5, "y": 3},
{"label": "-", "matrix": [3, 19], "x": 20.5, "y": 3},
{"label": "F9", "matrix": [4, 0], "x": 0, "y": 4},
{"label": "F10", "matrix": [4, 1], "x": 1, "y": 4},
{"label": "Ctrl", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"label": "Alt", "matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"label": "Space", "matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"label": "Alt", "matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"label": "Ctrl", "matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"label": "0", "matrix": [4, 16], "x": 17.5, "y": 4},
{"label": "00", "matrix": [4, 17], "x": 18.5, "y": 4},
{"label": ".", "matrix": [4, 18], "x": 19.5, "y": 4},
@@ -353,7 +319,6 @@
"layout": [
{"label": "F1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Esc", "matrix": [0, 2], "x": 2.25, "y": 0},
{"label": "1", "matrix": [0, 3], "x": 3.25, "y": 0},
{"label": "2", "matrix": [0, 4], "x": 4.25, "y": 0},
@@ -368,15 +333,12 @@
{"label": "-", "matrix": [0, 13], "x": 13.25, "y": 0},
{"label": "=", "matrix": [0, 14], "x": 14.25, "y": 0},
{"label": "Backspace", "matrix": [0, 15], "x": 15.25, "y": 0, "w": 2},
{"label": "Num Lock", "matrix": [0, 16], "x": 17.5, "y": 0},
{"label": "-", "matrix": [0, 17], "x": 18.5, "y": 0},
{"label": "/", "matrix": [0, 18], "x": 19.5, "y": 0},
{"label": "*", "matrix": [0, 19], "x": 20.5, "y": 0},
{"label": "F3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "F4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "Tab", "matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"label": "Q", "matrix": [1, 3], "x": 3.75, "y": 1},
{"label": "W", "matrix": [1, 4], "x": 4.75, "y": 1},
@@ -390,15 +352,12 @@
{"label": "P", "matrix": [1, 12], "x": 12.75, "y": 1},
{"label": "[", "matrix": [1, 13], "x": 13.75, "y": 1},
{"label": "]", "matrix": [1, 14], "x": 14.75, "y": 1},
{"label": "7", "matrix": [1, 16], "x": 17.5, "y": 1},
{"label": "8", "matrix": [1, 17], "x": 18.5, "y": 1},
{"label": "9", "matrix": [1, 18], "x": 19.5, "y": 1},
{"label": "+", "matrix": [1, 19], "x": 20.5, "y": 1},
{"label": "F5", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "F6", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "Caps Lock", "matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"label": "A", "matrix": [2, 3], "x": 4, "y": 2},
{"label": "S", "matrix": [2, 4], "x": 5, "y": 2},
@@ -413,15 +372,12 @@
{"label": "'", "matrix": [2, 13], "x": 14, "y": 2},
{"label": "#", "matrix": [1, 15], "x": 15, "y": 2},
{"label": "Enter", "matrix": [2, 15], "x": 16, "y": 1, "w": 1.25, "h": 2},
{"label": "4", "matrix": [2, 16], "x": 17.5, "y": 2},
{"label": "5", "matrix": [2, 17], "x": 18.5, "y": 2},
{"label": "6", "matrix": [2, 18], "x": 19.5, "y": 2},
{"label": "-", "matrix": [2, 19], "x": 20.5, "y": 2},
{"label": "F7", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "F8", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Shift", "matrix": [3, 2], "x": 2.25, "y": 3, "w": 1.25},
{"label": "\\", "matrix": [3, 3], "x": 3.5, "y": 3},
{"label": "Z", "matrix": [3, 4], "x": 4.5, "y": 3},
@@ -435,21 +391,17 @@
{"label": ".", "matrix": [3, 12], "x": 12.5, "y": 3},
{"label": "/", "matrix": [3, 13], "x": 13.5, "y": 3},
{"label": "Shift", "matrix": [3, 14], "x": 14.5, "y": 3, "w": 2.75},
{"label": "1", "matrix": [3, 16], "x": 17.5, "y": 3},
{"label": "2", "matrix": [3, 17], "x": 18.5, "y": 3},
{"label": "3", "matrix": [3, 18], "x": 19.5, "y": 3},
{"label": "-", "matrix": [3, 19], "x": 20.5, "y": 3},
{"label": "F9", "matrix": [4, 0], "x": 0, "y": 4},
{"label": "F10", "matrix": [4, 1], "x": 1, "y": 4},
{"label": "Ctrl", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"label": "Alt", "matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"label": "Space", "matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"label": "Alt", "matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"label": "Ctrl", "matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"label": "0", "matrix": [4, 16], "x": 17.5, "y": 4},
{"label": "00", "matrix": [4, 17], "x": 18.5, "y": 4},
{"label": ".", "matrix": [4, 18], "x": 19.5, "y": 4},
@@ -460,7 +412,6 @@
"layout": [
{"label": "F1", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F2", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "Esc", "matrix": [0, 2], "x": 2.25, "y": 0},
{"label": "1", "matrix": [0, 3], "x": 3.25, "y": 0},
{"label": "2", "matrix": [0, 4], "x": 4.25, "y": 0},
@@ -476,15 +427,12 @@
{"label": "=", "matrix": [0, 14], "x": 14.25, "y": 0},
{"label": "Backspace", "matrix": [0, 15], "x": 15.25, "y": 0},
{"label": "Delete", "matrix": [2, 14], "x": 16.25, "y": 0},
{"label": "Num Lock", "matrix": [0, 16], "x": 17.5, "y": 0},
{"label": "-", "matrix": [0, 17], "x": 18.5, "y": 0},
{"label": "/", "matrix": [0, 18], "x": 19.5, "y": 0},
{"label": "*", "matrix": [0, 19], "x": 20.5, "y": 0},
{"label": "F3", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "F4", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "Tab", "matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
{"label": "Q", "matrix": [1, 3], "x": 3.75, "y": 1},
{"label": "W", "matrix": [1, 4], "x": 4.75, "y": 1},
@@ -498,15 +446,12 @@
{"label": "P", "matrix": [1, 12], "x": 12.75, "y": 1},
{"label": "[", "matrix": [1, 13], "x": 13.75, "y": 1},
{"label": "]", "matrix": [1, 14], "x": 14.75, "y": 1},
{"label": "7", "matrix": [1, 16], "x": 17.5, "y": 1},
{"label": "8", "matrix": [1, 17], "x": 18.5, "y": 1},
{"label": "9", "matrix": [1, 18], "x": 19.5, "y": 1},
{"label": "+", "matrix": [1, 19], "x": 20.5, "y": 1},
{"label": "F5", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "F6", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "Caps Lock", "matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
{"label": "A", "matrix": [2, 3], "x": 4, "y": 2},
{"label": "S", "matrix": [2, 4], "x": 5, "y": 2},
@@ -521,15 +466,12 @@
{"label": "'", "matrix": [2, 13], "x": 14, "y": 2},
{"label": "#", "matrix": [1, 15], "x": 15, "y": 2},
{"label": "Enter", "matrix": [2, 15], "x": 16, "y": 1, "w": 1.25, "h": 2},
{"label": "4", "matrix": [2, 16], "x": 17.5, "y": 2},
{"label": "5", "matrix": [2, 17], "x": 18.5, "y": 2},
{"label": "6", "matrix": [2, 18], "x": 19.5, "y": 2},
{"label": "-", "matrix": [2, 19], "x": 20.5, "y": 2},
{"label": "F7", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "F8", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "Shift", "matrix": [3, 2], "x": 2.25, "y": 3, "w": 1.25},
{"label": "\\", "matrix": [3, 3], "x": 3.5, "y": 3},
{"label": "Z", "matrix": [3, 4], "x": 4.5, "y": 3},
@@ -544,21 +486,17 @@
{"label": "/", "matrix": [3, 13], "x": 13.5, "y": 3},
{"label": "Shift", "matrix": [3, 14], "x": 14.5, "y": 3, "w": 1.75},
{"label": "Fn", "matrix": [3, 15], "x": 16.25, "y": 3},
{"label": "1", "matrix": [3, 16], "x": 17.5, "y": 3},
{"label": "2", "matrix": [3, 17], "x": 18.5, "y": 3},
{"label": "3", "matrix": [3, 18], "x": 19.5, "y": 3},
{"label": "-", "matrix": [3, 19], "x": 20.5, "y": 3},
{"label": "F9", "matrix": [4, 0], "x": 0, "y": 4},
{"label": "F10", "matrix": [4, 1], "x": 1, "y": 4},
{"label": "Ctrl", "matrix": [4, 2], "x": 2.25, "y": 4, "w": 1.5},
{"label": "Alt", "matrix": [4, 4], "x": 4.75, "y": 4, "w": 1.5},
{"label": "Space", "matrix": [4, 8], "x": 6.25, "y": 4, "w": 7},
{"label": "Alt", "matrix": [4, 13], "x": 13.25, "y": 4, "w": 1.5},
{"label": "Ctrl", "matrix": [4, 15], "x": 15.75, "y": 4, "w": 1.5},
{"label": "0", "matrix": [4, 16], "x": 17.5, "y": 4},
{"label": "00", "matrix": [4, 17], "x": 18.5, "y": 4},
{"label": ".", "matrix": [4, 18], "x": 19.5, "y": 4},
@@ -566,4 +504,4 @@
]
}
}
}
}

View File

@@ -46,4 +46,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
return true;
}
}

View File

@@ -3,7 +3,7 @@
This is a standard weird layout PCB, best build with a 10U spacebar. It supports VIA.
* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar)
* Hardware Supported: A TKL keyboard with STM32F072CB
* Hardware Supported: A keyboard with STM32F072CB
* Hardware Availability: https://geon.works/
## Instructions
@@ -12,7 +12,7 @@ This is a standard weird layout PCB, best build with a 10U spacebar. It supports
Make example for this keyboard (after setting up your build environment):
make w1_at:default
make geonworks/w1_at:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
@@ -29,4 +29,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
- Unplug
- Hold Escape
- Plug In
- Flash using QMK Toolbox or CLI (`make w1_at:<keymap>:flash`)
- Flash using QMK Toolbox or CLI (`make geonworks/w1_at:<keymap>:flash`)

View File

@@ -0,0 +1,2 @@
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF

Some files were not shown because too many files have changed in this diff Show More