diff --git a/users/timfee/config.h b/users/timfee/config.h index 96d73f79..77c211ee 100644 --- a/users/timfee/config.h +++ b/users/timfee/config.h @@ -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 diff --git a/users/timfee/timfee.c b/users/timfee/timfee.c index 27f9f7d4..cbfe7a2e 100644 --- a/users/timfee/timfee.c +++ b/users/timfee/timfee.c @@ -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();