This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2025 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> | |
| // SPDX-License-Identifier: GPL-3.0-or-later | |
| #include "ft6x36.h" | |
| #include "i2c_master.h" | |
| #include "print.h" | |
| #include "timer.h" | |
| #include "gpio.h" | |
| #include "wait.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef I2C_DRIVER | |
| # define I2C_DRIVER I2CD1 | |
| #endif | |
| // ... | |
| if (io_expander_ready()) { | |
| // If we managed to initialize the mcp23018 - we need to reinitialize the matrix / layer state. During an electric discharge the i2c peripherals might be in a weird state. Giving a delay and resetting the MCU allows to recover from this. | |
| mcp23018_reset_loop = 0; | |
| mcp23018_errors = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include QMK_KEYBOARD_H | |
| // Dummy | |
| const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{KC_NO}}}; | |
| void suspend_power_down_user(void) { | |
| // Switch off sensor + LED making trackball unable to wake host | |
| adns5050_power_down(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Images credit j-inc(/James Incandenza) and pixelbenny. | |
| // Credit to obosob for initial animation approach. | |
| // heavily modified by drashna because he's a glutton for punishment | |
| #define OLED_ANIM_SIZE (32+1) | |
| #define OLED_ANIM_ROWS 4 | |
| #define OLED_ANIM_MAX_FRAMES 3 | |
| #define OLED_SLEEP_FRAMES 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| // additional fonts from | |
| // https://github.com/datacute/TinyOLED-Fonts | |
| #include "progmem.h" | |
| // clang-format off | |
| static const unsigned char font[] PROGMEM = { | |
| 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include QMK_KEYBOARD_H | |
| #ifdef OLED_ENABLE | |
| const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
| [0] = LAYOUT_ortho_2x4( | |
| KC_1, KC_2, KC_3, KC_4, | |
| KC_5, KC_6, KC_7, KC_8 | |
| ) | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uint16_t keycode_config(uint16_t keycode) { | |
| switch (keycode) { | |
| case KC_CAPS_LOCK: | |
| case KC_LOCKING_CAPS_LOCK: | |
| if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { | |
| return KC_LEFT_CTRL; | |
| } else if (keymap_config.swap_escape_capslock) { | |
| return KC_ESCAPE; | |
| } | |
| return keycode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #define OLED_KEYLOGGER_LENGTH 5 | |
| #define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_OLED_KEYLOG_STR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ qmk userspace-doctor ░▒▓ 11.00 40% 6.35G 11G | |
| --- Logging error --- | |
| Traceback (most recent call last): | |
| File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit | |
| stream.write(msg + self.terminator) | |
| ^^^^^^^^^^^^ | |
| AttributeError: 'str' object has no attribute 'write' | |
| Call stack: | |
| File "/usr/local/bin/qmk", line 8, in <module> | |
| sys.exit(main()) |
NewerOlder