{"id":16064663,"url":"https://github.com/eldruin/eeprom24x-rs","last_synced_at":"2025-08-20T05:30:51.805Z","repository":{"id":43211292,"uuid":"143476815","full_name":"eldruin/eeprom24x-rs","owner":"eldruin","description":"Platform agnostic Rust driver for 24x series serial EEPROM devices using embedded-hal","archived":false,"fork":false,"pushed_at":"2024-05-23T19:09:58.000Z","size":151,"stargazers_count":35,"open_issues_count":1,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-04T10:09:49.084Z","etag":null,"topics":["driver","eeprom","embedded","embedded-hal","embedded-hal-driver","i2c","memory","no-std","rust","rust-library"],"latest_commit_sha":null,"homepage":"https://blog.eldruin.com/24x-serial-eeprom-driver-in-rust/","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/eldruin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2018-08-03T22:00:12.000Z","updated_at":"2025-07-24T12:25:40.000Z","dependencies_parsed_at":"2023-12-21T22:22:12.083Z","dependency_job_id":"38b2d51b-ea85-491c-adad-ff61c706a048","html_url":"https://github.com/eldruin/eeprom24x-rs","commit_stats":{"total_commits":173,"total_committers":7,"mean_commits":"24.714285714285715","dds":0.09248554913294793,"last_synced_commit":"390066c6914fc4df26819a6e2a44a13a64ce2de4"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/eldruin/eeprom24x-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Feeprom24x-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Feeprom24x-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Feeprom24x-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Feeprom24x-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldruin","download_url":"https://codeload.github.com/eldruin/eeprom24x-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldruin%2Feeprom24x-rs/sbom","scorecard":{"id":371710,"data":{"date":"2025-08-11","repo":{"name":"github.com/eldruin/eeprom24x-rs","commit":"390066c6914fc4df26819a6e2a44a13a64ce2de4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 7/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:111: update your workflow using https://app.stepsecurity.io/secureworkflow/eldruin/eeprom24x-rs/build.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T13:08:32.779Z","repository_id":43211292,"created_at":"2025-08-18T13:08:32.779Z","updated_at":"2025-08-18T13:08:32.779Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271269033,"owners_count":24730066,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["driver","eeprom","embedded","embedded-hal","embedded-hal-driver","i2c","memory","no-std","rust","rust-library"],"created_at":"2024-10-09T05:09:01.870Z","updated_at":"2025-08-20T05:30:51.496Z","avatar_url":"https://github.com/eldruin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust 24x EEPROM Driver\n\n[![crates.io](https://img.shields.io/crates/v/eeprom24x.svg)](https://crates.io/crates/eeprom24x)\n[![Docs](https://docs.rs/eeprom24x/badge.svg)](https://docs.rs/eeprom24x)\n![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)\n[![Build Status](https://github.com/eldruin/eeprom24x-rs/workflows/Build/badge.svg)](https://github.com/eldruin/eeprom24x-rs/actions?query=workflow%3ABuild)\n[![Coverage Status](https://coveralls.io/repos/eldruin/eeprom24x-rs/badge.svg?branch=master)](https://coveralls.io/r/eldruin/eeprom24x-rs?branch=master)\n\nThis is a platform agnostic Rust driver for the 24x series serial EEPROM,\nbased on the [`embedded-hal`] traits.\n\n[`embedded-hal`]: https://github.com/rust-embedded/embedded-hal\n\nThis driver allows you to:\n\n- Read a single byte from a memory address. See: `read_byte()`.\n- Read a byte array starting on a memory address. See: `read_data()`.\n- Read the current memory address (please read notes). See: `read_current_address()`.\n- Write a byte to a memory address. See: `write_byte()`.\n- Write a byte array (up to a memory page) to a memory address. See: `write_page()`.\n- Read `CSx`-variant devices' factory-programmed unique serial. See: `read_unique_serial()`.\n- Use the device in generic code via the `Eeprom24xTrait`.\n\nCan be used at least with the devices listed below.\n\n[Introductory blog post](https://blog.eldruin.com/24x-serial-eeprom-driver-in-rust/)\n\n## The devices\n\nThese devices provides a number of bits of serial electrically erasable and\nprogrammable read only memory (EEPROM) organized as a number of words of 8 bits\neach. The devices' cascadable feature allows up to 8 devices to share a common\n2-wire bus. The devices are optimized for use in many industrial and commercial\napplications where low power and low voltage operation are essential.\n\n| Device | Memory bits | 8-bit words | Page size | Datasheet  |\n|-------:|------------:|------------:|----------:|:-----------|\n|  24x00 |    128 bits |          16 |       N/A | [24C00]    |\n|  24x01 |      1 Kbit |         128 |   8 bytes | [AT24C01]  |\n| M24x01 |      1 Kbit |         128 |  16 bytes | [M24C01]   |\n|  24x02 |      2 Kbit |         256 |   8 bytes | [AT24C02]  |\n| M24x02 |      2 Kbit |         256 |  16 bytes | [M24C02]   |\n|  24x04 |      4 Kbit |         512 |  16 bytes | [AT24C04]  |\n|  24x08 |      8 Kbit |       1,024 |  16 bytes | [AT24C08]  |\n|  24x16 |     16 Kbit |       2,048 |  16 bytes | [AT24C16]  |\n|  24x32 |     32 Kbit |       4,096 |  32 bytes | [AT24C32]  |\n|  24x64 |     64 Kbit |       8,192 |  32 bytes | [AT24C64]  |\n| 24x128 |    128 Kbit |      16,384 |  64 bytes | [AT24C128] |\n| 24x256 |    256 Kbit |      32,768 |  64 bytes | [AT24C256] |\n| 24x512 |    512 Kbit |      65,536 | 128 bytes | [AT24C512] |\n| 24xM01 |      1 Mbit |     131,072 | 256 bytes | [AT24CM01] |\n| 24xM02 |      2 Mbit |     262,144 | 256 bytes | [AT24CM02] |\n\n[24C00]: https://ww1.microchip.com/downloads/en/DeviceDoc/24AA00-24LC00-24C00-Data-Sheet-20001178J.pdf\n[AT24C01]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8871F-SEEPROM-AT24C01D-02D-Datasheet.pdf\n[M24C01]: https://www.st.com/resource/en/datasheet/m24c01-r.pdf\n[AT24C02]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8871F-SEEPROM-AT24C01D-02D-Datasheet.pdf\n[M24C02]: https://www.st.com/resource/en/datasheet/m24c02-r.pdf\n[AT24C04]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8896E-SEEPROM-AT24C04D-Datasheet.pdf\n[AT24C08]: https://ww1.microchip.com/downloads/en/DeviceDoc/AT24C08D-I2C-Compatible-2-Wire-Serial-EEPROM-20006022A.pdf\n[AT24C16]: https://ww1.microchip.com/downloads/en/DeviceDoc/20005858A.pdf\n[AT24C32]: https://ww1.microchip.com/downloads/en/devicedoc/doc0336.pdf\n[AT24C64]: https://ww1.microchip.com/downloads/en/devicedoc/doc0336.pdf\n[AT24C128]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8734-SEEPROM-AT24C128C-Datasheet.pdf\n[AT24C256]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8568-SEEPROM-AT24C256C-Datasheet.pdf\n[AT24C512]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8720-SEEPROM-AT24C512C-Datasheet.pdf\n[AT24CM01]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8812-SEEPROM-AT24CM01-Datasheet.pdf\n[AT24CM02]: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8828-SEEPROM-AT24CM02-Datasheet.pdf\n\n## Usage\n\nTo use this driver, import this crate and an `embedded_hal` implementation,\nthen instantiate the appropriate device.\nIn the following examples an instance of the device AT24C256 will be created\nas an example. Other devices can be created with similar methods like:\n`Eeprom24x::new_24x64(...)`.\n\nPlease find additional examples using hardware in this repository: [driver-examples]\n\n[driver-examples]: https://github.com/eldruin/driver-examples\n\n```rust\nuse eeprom24x::{Eeprom24x, SlaveAddr};\nuse embedded_hal::blocking::delay::DelayMs;\nuse linux_embedded_hal::{Delay, I2cdev};\n\nfn main() {\n    let dev = I2cdev::new(\"/dev/i2c-1\").unwrap();\n    let address = SlaveAddr::default();\n    let mut eeprom = Eeprom24x::new_24x256(dev, address);\n    let memory_address = 0x1234;\n    let data = 0xAB;\n\n    eeprom.write_byte(memory_address, data).unwrap();\n\n    Delay.delay_ms(5u16);\n\n    let read_data = eeprom.read_byte(memory_address).unwrap();\n\n    println!(\n        \"Read memory address: {}, retrieved content: {}\",\n        memory_address, \u0026read_data\n    );\n\n    let _dev = eeprom.destroy(); // Get the I2C device back\n}\n```\n\n## Features\n\n### defmt-03\n\nTo enable [defmt](https://crates.io/crates/defmt) (version `0.3.x`) support, when specifying the dependency on `eeprom24x`, add the feature \"`defmt-03`\".\n\n```toml\n[dependencies]\neeprom24x = { version = \"0.7.2\", features = [\"defmt-03\"] }\n```\n\n## Support\n\nFor questions, issues, feature requests, and other changes, please file an\n[issue in the github project](https://github.com/eldruin/eeprom24x-rs/issues).\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n   \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contributing\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\nbe dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Feeprom24x-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldruin%2Feeprom24x-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldruin%2Feeprom24x-rs/lists"}