mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-07 10:53:17 +02:00
* Add HEER S1 macropad * Address review feedback for HEER S1 - readme: add product image, correct maintainer link and availability URL - config.h: drop OLED_DISPLAY_ADDRESS, already the driver default - keyboard.json: drop the i2c block, which only feeds split transport - move the OLED to heer_s1.c as oled_task_kb - default keymap reduced to keymaps[] and encoder_map[] The default keymap also configured GP16/GP17 as GPIO inputs at boot. Those are the OLED's I2C SDA/SCL lines, so it tore down the display bus on every start. The encoder switches are on GP2/GP14. Removed along with the rest of the code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Update keyboards/heer_s1/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keyboard.json Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/readme.md Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keyboard.json Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keyboard.json Co-authored-by: Joel Challis <git@zvecr.com> * Fix duplicated enumerators in default keymap The suggested enum replacement was applied alongside the original entries rather than in place of them, leaving L_BASE, L_MEDIA and L_EDIT declared twice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Update keyboards/heer_s1/readme.md Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/heer_s1/keyboard.json Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: HEER <heerelectronix@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Joel Challis <git@zvecr.com>
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
// Copyright 2026 Heer (@heer)
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "quantum.h"
|
|
|
|
#ifdef OLED_ENABLE
|
|
|
|
// The panel is mounted upside-down on the PCB, so the rotation belongs to the
|
|
// board rather than to any one keymap.
|
|
//
|
|
// This returns the rotation and nothing else. oled_driver.c does:
|
|
//
|
|
// oled_rotation = oled_init_user(oled_init_kb(rotation));
|
|
//
|
|
// so the driver already chains the keymap's hook onto this one's result —
|
|
// calling oled_init_user() from in here would run it twice.
|
|
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
|
return OLED_ROTATION_180;
|
|
}
|
|
|
|
// A keymap that draws its own screen returns false from oled_task_user, which
|
|
// stops the board's default display painting over it. This mirrors the weak
|
|
// default in oled_driver.c, which is simply `return oled_task_user();`.
|
|
bool oled_task_kb(void) {
|
|
if (!oled_task_user()) {
|
|
return false;
|
|
}
|
|
|
|
oled_set_cursor(0, 0);
|
|
oled_write_P(PSTR(" HEER S1"), false);
|
|
|
|
oled_set_cursor(0, 1);
|
|
oled_write_P(PSTR("---------------"), false);
|
|
|
|
// Shown as a number, not a name: a board-level default cannot know what any
|
|
// given keymap calls its layers.
|
|
oled_set_cursor(0, 2);
|
|
oled_write_P(PSTR("LAYER "), false);
|
|
oled_write_char('0' + get_highest_layer(layer_state), false);
|
|
|
|
oled_set_cursor(0, 3);
|
|
oled_write_P(PSTR("["), false);
|
|
for (uint8_t i = 0; i < 4; i++) {
|
|
oled_write_P(get_highest_layer(layer_state) == i ? PSTR("*") : PSTR("-"), false);
|
|
}
|
|
oled_write_P(PSTR("]"), false);
|
|
|
|
return true;
|
|
}
|
|
|
|
#endif // OLED_ENABLE
|