| Crates.io | st-mems-bus |
| lib.rs | st-mems-bus |
| version | 1.0.1 |
| created_at | 2025-07-31 09:29:16.366372+00 |
| updated_at | 2025-08-20 12:56:28.213556+00 |
| description | Wrapper for I2C and SPI buses, providing a unified API to the underlying bus. |
| homepage | |
| repository | https://github.com/STMicroelectronics/st-mems-rust-drivers/tree/main/util/st-mems-bus |
| max_upload_size | |
| id | 1774750 |
| size | 13,596 |
The st-mems-bus Library provides a unified and consistent API for accessing different types of communication buses. Currently, it supports both SPI and I2C buses, offering various modes for managing bus ownership and access.
RefCell internally and calls borrow_mut() to ensure exclusive mutable access to the bus at runtime. While this introduces some overhead, it provides a simple mechanism to safely share the bus. More advanced sharing techniques are left to the user to implement as needed.Add the library to your dependencies in Cargo.toml:
[dependencies]
st-mems-bus = { path = "path_to_bus" }
To keep the library lightweight, you can enable support for each bus type individually. By default, all bus types are included. Available features:
More information: http://www.st.com
Copyright © 2025 STMicroelectronics