{"id":17784913,"url":"https://github.com/rust-embedded-community/st7567s","last_synced_at":"2025-03-16T04:30:49.477Z","repository":{"id":148972013,"uuid":"621169064","full_name":"rust-embedded-community/st7567s","owner":"rust-embedded-community","description":"Driver for the ST7567S LCD controller","archived":false,"fork":false,"pushed_at":"2023-04-04T10:06:28.000Z","size":835,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-09T13:42:36.490Z","etag":null,"topics":["embedded","rust","st7567"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-embedded-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACH","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-30T06:01:49.000Z","updated_at":"2024-10-14T06:56:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"88949ea1-157c-4535-8334-5fd4c1f8002f","html_url":"https://github.com/rust-embedded-community/st7567s","commit_stats":null,"previous_names":["rust-embedded-community/st7567s","kattouf/st7567s"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded-community%2Fst7567s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded-community%2Fst7567s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded-community%2Fst7567s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded-community%2Fst7567s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-embedded-community","download_url":"https://codeload.github.com/rust-embedded-community/st7567s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243802944,"owners_count":20350316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","rust","st7567"],"created_at":"2024-10-27T08:22:11.899Z","updated_at":"2025-03-16T04:30:49.460Z","avatar_url":"https://github.com/rust-embedded-community.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ST7567S Display Controller Driver\n\n[![Crates.io](https://img.shields.io/crates/v/st7567s.svg)](https://crates.io/crates/st7567s)\n[![Docs.rs](https://docs.rs/st7567s/badge.svg)](https://docs.rs/st7567s)\n\nThis crate provides a driver for the ST7567S display controller that can be used with Rust embedded projects.\n\n# Features\n\n- Supports I2C and SPI communication protocols via the [`display_interface`](https://docs.rs/display_interface) crate.\n- Provides two display modes:\n  - Direct Write Mode (by default): This mode allows you to write directly to the display memory by calling the [`draw`] method.\n  - Buffered Mode: This mode allows you to modify an internal buffer by using methods like [`set_pixel`], [`clear`], or by using the [`embedded-graphics`] crate. Once you have made your changes, you can call the [`flush`] method to write the buffer to the display.\n\n[`embedded-graphics`]: https://docs.rs/embedded-graphics\n\n# Notes\n\n- This driver is designed to work with a more common 128x64 resolution, instead of the original 132x65 resolution of the ST7567S controller.\n- SPI communication is not tested yet.\n\n# Examples\n\n### Direct write mode\n\n```rust\nuse st7567s::{\n    display::{DirectWriteMode, ST7567S},\n    interface::{I2CDisplayInterface, I2CInterface},\n};\nstruct I2CStub;\nimpl embedded_hal::blocking::i2c::Write for I2CStub {\n    type Error = ();\n    fn write(\u0026mut self, _addr: u8, _buf: \u0026[u8]) -\u003e Result\u003c(), ()\u003e {\n        Ok(())\n    }\n}\n\nlet i2c = I2CStub;\nlet interface = I2CDisplayInterface::new(i2c);\nlet mut display = ST7567S::new(interface);\ndisplay.init().unwrap();\n\n// Set all pixels to enabled state\ndisplay\n    .draw([0xff; 128 * 64 / 8].as_slice())\n    .unwrap();\n\n```\n\n### Buffered mode + embedded_graphics\n\n```rust\nuse st7567s::{\n    display::{BufferedMode, ST7567S},\n    interface::{I2CDisplayInterface, I2CInterface},\n};\nuse embedded_graphics::{\n    mono_font::{ascii::FONT_6X10, MonoTextStyleBuilder},\n    pixelcolor::BinaryColor,\n    prelude::*,\n    text::{Baseline, Text},\n};\nstruct I2CStub;\nimpl embedded_hal::blocking::i2c::Write for I2CStub {\n    type Error = ();\n    fn write(\u0026mut self, _addr: u8, _buf: \u0026[u8]) -\u003e Result\u003c(), ()\u003e {\n        Ok(())\n    }\n}\n\nlet i2c = I2CStub;\nlet interface = I2CDisplayInterface::new(i2c);\nlet mut display = ST7567S::new(interface)\n    .into_buffered_graphics_mode();\ndisplay.init().unwrap();\n\nlet text_style = MonoTextStyleBuilder::new()\n    .font(\u0026FONT_6X10)\n    .text_color(BinaryColor::On)\n    .build();\n\nText::with_baseline(\"Hello world!\", Point::zero(), text_style, Baseline::Top)\n    .draw(\u0026mut display)\n    .unwrap();\n\nText::with_baseline(\"Hello Rust!\", Point::new(0, 16), text_style, Baseline::Top)\n    .draw(\u0026mut display)\n    .unwrap();\n\ndisplay.flush().unwrap();\n```\n\nThanks [`ssd1306`](https://github.com/jamwaffles/ssd1306) driver for served as an example.\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-embedded-community%2Fst7567s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-embedded-community%2Fst7567s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-embedded-community%2Fst7567s/lists"}