| Crates.io | i2c-general-call |
| lib.rs | i2c-general-call |
| version | 0.1.0 |
| created_at | 2025-11-14 22:35:30.6834+00 |
| updated_at | 2025-11-14 22:35:30.6834+00 |
| description | Platform-agnostic Rust driver for I2C general calls. |
| homepage | https://github.com/kurtjd/i2c-general-call |
| repository | https://github.com/kurtjd/i2c-general-call |
| max_upload_size | |
| id | 1933632 |
| size | 15,288 |
A simple #[no_std] platform-agnostic driver for issuing I2C general calls according to spec.
let mut driver = i2c_general_call::GeneralCall::new(i2c_bus_instance);
// Issue a latch address general call command, which instructs devices to latch their address based on current hardware state.
driver.latch_addr().expect("No devices on the bus support the latch address general call command.");
// Issue a reset general call command, which instructs devices to reset registers to power-on state.
// This also instructs devices to latch their address based on current hardware state.
driver.reset().expect("No devices on the bus support the reset general call command.");
Async I2C transactions are also supported by enabling the async feature and adding .await to
calls in the above usage example.
Licensed under the terms of the MIT license.