Files
437025dcb1 Add HEER S1 macropad (#26373)
* 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>
2026-08-04 22:46:16 -07:00

33 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Copyright 2026 Heer (@heer)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
// ── OLED (SH1106 1.3", 128×64, I2C address 0x3C) ────────────────────────────
#define OLED_DISPLAY_128X64
#define OLED_IC OLED_IC_SH1106
#define OLED_COLUMN_OFFSET 2
#define OLED_BRIGHTNESS 180
#define OLED_TIMEOUT 0
#define OLED_UPDATE_INTERVAL 10
// NOTE: do NOT raise OLED_UPDATE_PROCESS_LIMIT. The default of 1 keeps each I2C
// transaction to a single 32-byte block.
//
// TESTED, TWICE, ON HARDWARE: a limit of 4 — only 128 bytes, one page, the write
// size stock SSD1306/SH1106 drivers use — blanks this panel completely. The board
// keeps running (keys and encoders work) but the display never comes up. The
// reasoning that "a page is safe because everyone writes pages" is wrong for this
// module. Do not try it again.
//
// OLED_UPDATE_INTERVAL is a different knob and is safe to shorten: it changes how
// OFTEN a block is flushed, not how BIG the transaction is, which stays one
// 32-byte block. At the old 33ms, swapping the right-hand panel between the key
// grid and the encoder bars took ~21 blocks * 33ms = ~700ms to reach the glass —
// you would turn the knob and see the bar most of a second later. 10ms puts that
// at ~210ms. If the panel ever misbehaves, this is the first value to put back.
// ── I2C (OLED on GP16=SDA, GP17=SCL via RP2040 I2C0) ────────────────────────
#define I2C_DRIVER I2CD0
#define I2C1_SDA_PIN GP16
#define I2C1_SCL_PIN GP17