CO5300 AMOLED Display Driver
This crate provides a driver for the CO5300 AMOLED display controller, often found in high-resolution wearables (e.g., 454x454 or 466x466).

Constraints
[!WARNING] Address Window Alignment The CO5300 controller requires 2-byte alignment for column and row addresses.
xandystart coordinates must be even.- Width and height must be multiples of 2.
- When writing pixel data, always write at least 2 lines.
Failure to follow this will result in visual artifacts or the display ignoring the command.
Usage
This driver is designed to work with the display-driver crate. You can use the DisplayDriver struct to drive the display.
1. Choose a Spec
The CO5300 controller powers various high-resolution AMOLED panels. These panels differ in resolution, offsets, and initialization sequences.
This crate uses a Spec trait (Co5300Spec) to handle these differences at compile time.
You must choose a Spec that matches your hardware from the Built-in Panel Specs list, or implement your own.
2. Implementation Example
use ;
use ;
// ... Setup SPI/QSPI bus and Reset Pin ...
// Configure Reset
let reset_opt = new_pin;
// Create the Panel instance using a Spec (e.g., AM196Q410502LK_196)
let panel = new;
// Create the DisplayDriver using builder pattern
// The driver orchestrates the logic, delegating transport to 'bus' and commands to 'panel'.
let mut display = builder
.with_color_format
.with_orientation
.init.await.unwrap;
display.panel.set_brightness.await.unwrap;
// Draw
display.write_pixels;
For a complete working example using Slint UI on the SF32LB52x platform, please visit: SF32 Slint Example
Panel Specs
Built-in Panel Specs
The following panels are defined in src/spec.rs. Use the corresponding struct as the Spec generic parameter when initializing Co5300.
| Struct Name | Resolution | Offsets (X, Y) | Note |
|---|---|---|---|
AM196Q410502LK_196 |
410x502 | (22, 0) | - |
AM178Q368448LK_178 |
368x448 | (16, 0) | - |
AM151Q466466LK_151_C |
466x466 | (6, 0) | - |
AM200Q460460LK_200 |
460x460 | (10, 0) | - |
H0198S005AMT005_V0_195 |
410x502 | (44, 0) | - |
Amoled_185Inch_390x450 |
390x450 | (0, 0) | Uses Page Switch 0x20 |
GenericCo5300 |
240x240 | (0, 0) | Default placeholder |
Implementing a Custom Spec
To support a new panel, implement the Co5300Spec trait.
use ;
;
License
This project is under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).