-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and updates to TKC1800 code (#8472)
* TKC1800: updated to support QMK-DFU bootloader * TKC1800: updated to support QMK-DFU bootloader * TKC1800: Updated to utilize common I2C and OLED code * Refactor OLED code in VIA keymap * Fix for screen disconnected error. * Added changelog for breaking change process
- Loading branch information
1 parent
a823d80
commit 70ac431
Showing
15 changed files
with
178 additions
and
683 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Refactor of TKC1800 to use common OLED code | ||
|
||
[#8472](https://github.com/qmk/qmk_firmware/pull/8472) Modifies the default firmware for TKC1800 to use the in-built I2C and OLED drivers, instead of including and depending on its own set of libraries for the following functionality: | ||
- SSD1306 display | ||
- i2c for OLED | ||
|
||
This allows current TKC1800 firmware to advance with updates to those drivers, which are shared with other keyboards. | ||
|
||
## To migrate existing TKC1800 firmware: | ||
|
||
[Changes to `config.h`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-d10b26e676b4a55cbb00d71955116526): | ||
- Remove `#define SSD1306OLED` from config.h | ||
|
||
[Changes to `tkc1800.c`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-3b35bd30abe89c8110717c6972cd2cc5): | ||
- Add the following to avoid debug errors on HID_listen if the screen is not present | ||
```c | ||
void keyboard_pre_init_kb(void) { | ||
setPinInputHigh(D0); | ||
setPinInputHigh(D1); | ||
|
||
keyboard_pre_init_user(); | ||
} | ||
``` | ||
[Changes to `keymap.c`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-05a2a344ce27e4d045fe68520ccd4771): | ||
- Find/Replace each instance of `#ifdef SSD1306OLED` with `#ifdef OLED_DRIVER_ENABLE` | ||
- The following changes are for compatibility with the OLED driver. If you don't use the OLED driver you may safely delete [this section](https://github.com/qmk/qmk_firmware/blob/e6b9980bd45c186f7360df68c24b6e05a80c10dc/keyboards/lily58/keymaps/default/keymap.c#L144-L190) | ||
- [Remove](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7L91-L158) the block | ||
```c | ||
#ifdef SSD1306OLED | ||
iota_gfx_init(!has_usb()); // turns on the display | ||
#endif | ||
``` | ||
- Within the block bounded by `#ifdef OLED_DRIVER_ENABLE` and `#endif // OLED_DRIVER_ENABLE`, add the following block to ensure that your two OLEDs are rotated correctly across the left and right sides: | ||
```c | ||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
if (!is_keyboard_master()) | ||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
return rotation; | ||
} | ||
``` | ||
- Remove the function `iota_gfx_task_user` |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.