diff options
author | Jack Sangdahl <[email protected]> | 2025-01-30 13:44:05 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2025-01-30 13:44:05 -0700 |
commit | 774be820b1de8a5d150e2228dbe94b281f88ac38 (patch) | |
tree | 0893aeb2a0709be2c4e2d7e723cc86e742ad634e | |
parent | ff09b921f1c2160abe05c1fdbd38f25f64b6c7bd (diff) | |
download | qmk_firmware-dd/oled.tar.gz qmk_firmware-dd/oled.zip |
Initial OLED configuration optionsdd/oled
-rw-r--r-- | data/mappings/info_config.hjson | 23 | ||||
-rw-r--r-- | data/mappings/info_rules.hjson | 3 | ||||
-rw-r--r-- | data/schemas/keyboard.jsonschema | 65 |
3 files changed, 91 insertions, 0 deletions
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index b643553b52..6e49ba71c2 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -125,6 +125,29 @@ "MOUSEKEY_TIME_TO_MAX": {"info_key": "mousekey.time_to_max", "value_type": "int"}, "MOUSEKEY_WHEEL_DELAY": {"info_key": "mousekey.wheel_delay", "value_type": "int"}, + // OLED + "OLED_BRIGHTNESS": {"info_key": "oled.brightness", "value_type": "int"}, + "OLED_COLUMN_OFFSET": {"info_key": "oled.column_offset", "value_type": "int"}, + "OLED_DISPLAY_CLOCK": {"info_key": "oled.display_clock", "value_type": "hex"}, + "OLED_FONT_H": {"info_key": "oled.font.path", "value_type": "str"}, + "OLED_FONT_START": {"info_key": "oled.font.start", "value_type": "int"}, + "OLED_FONT_END": {"info_key": "oled.font.end", "value_type": "int"}, + "OLED_FONT_WIDTH": {"info_key": "oled.font.width", "value_type": "int"}, + "OLED_FONT_HEIGHT": {"info_key": "oled.font.height", "value_type": "int"}, + "OLED_FADE_OUT": {"info_key": "oled.fade_out.enabled", "value_type": "flag"}, + "OLED_FADE_OUT_INTERVAL": {"info_key": "oled.fade_out.interval", "value_type": "hex"}, + "OLED_TIMEOUT": {"info_key": "oled.timeout", "value_type": "int"}, + "OLED_SCROLL_TIMEOUT": {"info_key": "oled.scroll.timeout", "value_type": "int"}, + "OLED_SCROLL_TIMEOUT_RIGHT": {"info_key": "oled.scroll.right", "value_type": "flag"}, + "OLED_UPDATE_INTERVAL": {"info_key": "oled.update_interval", "value_type": "int"}, + "OLED_UPDATE_PROCESS_LIMIT": {"info_key": "oled.process_limit", "value_type": "int"}, + "OLED_DISPLAY_ADDRESS": {"info_key": "oled.i2c.address", "value_type": "hex"}, + "OLED_DC_PIN": {"info_key": "oled.spi.dc_pin"}, + "OLED_CS_PIN": {"info_key": "oled.spi.cs_pin"}, + "OLED_RST_PIN": {"info_key": "oled.spi.rst_pin"}, + "OLED_SPI_MODE": {"info_key": "oled.spi.mode", "value_type": "int"}, + "OLED_SPI_DIVISOR": {"info_key": "oled.spi.divisor", "value_type": "int"} + // One Shot "ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"}, "ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"}, diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 00685b5b5f..c1b910ff17 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -35,6 +35,9 @@ "MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"}, "MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"}, "NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"}, + "OLED_ENABLE": {"info_key": "oled.enabled", "value_type": "bool"}, + "OLED_DRIVER": {"info_key": "oled.driver"}, + "OLED_TRANSPORT" {"info_key": "oled.transport"}, "PIN_COMPATIBLE": {"info_key": "pin_compatible"}, "PLATFORM_KEY": {"info_key": "platform_key", "to_json": false}, "PS2_DRIVER": {"info_key": "ps2.driver"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 8b6cc7032b..bf49a37f4f 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -478,6 +478,71 @@ "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } }, + "oled": { + "type": "object", + "properties": { + "enabled": {"type": "boolean"}, + "driver": { + "type": "string", + "enum": ["custom", "ssd1306"] + }, + "transport": { + "type": "string", + "enum": ["custom", "i2c", "spi"] + }, + "brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "column_offset": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "display_clock": {"$ref": "qmk.definitions.v1#/hex_number_2d"}, + "font": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": {"type": "string"}, + "start": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "end": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "width": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "height": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + } + }, + "fade_out": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "interval": {"$ref": "qmk.definitions.v1#/hex_number_2d"} + } + }, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "scroll": { + "type": "object", + "additionalProperties": false, + "properties": { + "right": {"type": "boolean"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + "update_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "i2c": { + "type": "object", + "additionalProperties": false, + "properties": { + "address": {"$ref": "qmk.definitions.v1#/hex_number_2d"}, + } + }, + "spi": { + "type": "object", + "additionalProperties": false, + "properties": { + "dc_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "cs_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "rst_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "mode": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "divisor": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + } + } + } + }, "oneshot": { "type": "object", "properties": { |