mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-04-22 11:30:23 -04:00
Merge pull request #7 from timfee/copilot/fix-screen-issue
Fix SSD1312 OLED mirrored text: raw I2C segment remap override for corne-choc-pro driver
This commit is contained in:
commit
5932400239
2 changed files with 18 additions and 3 deletions
|
|
@ -16,11 +16,13 @@
|
|||
#define COMBO_ONLY_FROM_LAYER 0
|
||||
|
||||
// ── OLED (SSD1312 on Keebart Corne Choc Pro) ──
|
||||
#define OLED_IC OLED_IC_SSD1312
|
||||
// Note: The vial-qmk-corne-choc-pro driver lacks SSD1312 support
|
||||
// (no OLED_IC_SSD1312, OLED_FLIP_SEGMENT, or configurable charge pump).
|
||||
// We set what the driver honors here; the SSD1312-specific fixups
|
||||
// (segment remap + charge pump voltage) are sent via raw I2C commands
|
||||
// in oled_post_init() inside timfee.c.
|
||||
#define OLED_DISPLAY_128X64
|
||||
#define OLED_FLIP_SEGMENT
|
||||
#define OLED_DISPLAY_ADDRESS 0x3C
|
||||
#define OLED_CHARGE_PUMP_VALUE 0x72
|
||||
#define OLED_BRIGHTNESS 64
|
||||
#define OLED_TIMEOUT 0
|
||||
#define OLED_TIMEOUT_USER 60000
|
||||
|
|
|
|||
|
|
@ -317,6 +317,19 @@ static bool oled_post_init(void) {
|
|||
pin_t pen = get_charge_pump_enable_pin();
|
||||
gpio_write_pin_high(pen);
|
||||
wait_ms(20);
|
||||
|
||||
// The vial-qmk-corne-choc-pro OLED driver does not support
|
||||
// OLED_IC_SSD1312, OLED_FLIP_SEGMENT, or configurable charge pump.
|
||||
// It hardcodes SEGMENT_REMAP_INV (0xA1) and CHARGE_PUMP 0x14,
|
||||
// but the SSD1312 needs SEGMENT_REMAP (0xA0) and charge pump 0x72.
|
||||
// Send the correct values as raw I2C commands after driver init.
|
||||
static const uint8_t ssd1312_fixup[] = {
|
||||
0x00, // I2C command mode
|
||||
0xA0, // SEGMENT_REMAP: flip segment direction for SSD1312
|
||||
0x8D, 0x72, // CHARGE_PUMP: 9.0 V for SSD1312
|
||||
};
|
||||
oled_send_cmd(ssd1312_fixup, sizeof(ssd1312_fixup));
|
||||
|
||||
oled_clear();
|
||||
|
||||
g_user_ontime = timer_read32();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue