4 releases (2 breaking)

✓ Uses Rust 2018 edition

0.2.0 Sep 1, 2019
0.1.1 Aug 13, 2019
0.1.0 Aug 5, 2019
0.0.2 Jul 30, 2019

#99 in No standard library

Download history 25/week @ 2019-07-30 43/week @ 2019-08-06 22/week @ 2019-08-13 64/week @ 2019-08-20 28/week @ 2019-08-27 26/week @ 2019-09-03 21/week @ 2019-09-10 57/week @ 2019-09-17 7/week @ 2019-09-24 14/week @ 2019-10-01 7/week @ 2019-10-15 46/week @ 2019-10-22

57 downloads per month
Used in 1 crate

Apache-2.0

22KB
302 lines

RusPiRo - Mailbox Property Tag Interface

This crate implements an abstraction of the mailbox property tag interface available in the Raspberry Pi. There are currently a limmited number of functions for the following property tag messages implemented:

  • GetArmMemory
  • GetClockRate
  • SetClockRate

Check the official documentation of those property tags and their purpose.

Travis-CI Status Latest Version Documentation License

Usage

To use the crate just add the following dependency to your Cargo.toml file:

[dependencies]
ruspiro-mailbox = "0.2"

Once done the access to the mailbox interface access is available in your rust files like so:

use ruspiro_mailbox::*;

fn demo() {
    // use the mailbox to retrieve the core clock rate
    if let Ok(core_rate) = MAILBOX.take_for(|mb| mb.get_clockrate(ArmClockId::Core)) {
        // here we know the core clock rate do something with it...
        println!("Core clock rate {}", core_rate);
    }
}

License

Licensed under Apache License, Version 2.0, (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)

Dependencies

~0.6–1MB
~23K SLoC