Crates.io | ruspiro-mailbox |
lib.rs | ruspiro-mailbox |
version | 0.4.1 |
source | src |
created_at | 2019-07-30 07:21:44.953777 |
updated_at | 2021-09-09 10:22:40.438237 |
description | Raspberry Pi mailbox property tag interface API. |
homepage | |
repository | https://github.com/RusPiRo/ruspiro-mailbox/tree/v0.4.1 |
max_upload_size | |
id | 152837 |
size | 92,745 |
This crate implements an abstraction of the mailbox property tag interface available in the Raspberry Pi.
Check the official documentation of those property tags and their purpose.
To use the crate just add the following dependency to your Cargo.toml
file:
[dependencies]
ruspiro-mailbox = "0.4.1"
Once done the access to the mailbox interface access is available in your rust files like so:
use ruspiro_mailbox::*;
fn demo() {
let mut mb = Mailbox::new();
// use the mailbox to retrieve the core clock rate
if let Ok(core_rate) = mb.get_clockrate(ArmClockId::Core) {
// here we know the core clock rate do something with it...
println!("Core clock rate {}", core_rate);
}
}
Licensed under Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or MIT (LICENSE-MIT or http://opensource.org/licenses/MIT)) at your choice.