#cache #ruspiro #raspberry-pi #bare-metal

nightly sys no-std ruspiro-cache

Raspberry Pi cache maintenance operation API

5 unstable releases

0.4.1 Apr 23, 2021
0.4.0 Sep 23, 2020
0.3.0 Dec 14, 2019
0.1.1 Aug 12, 2019
0.1.0 Aug 12, 2019

#2265 in Embedded development

Download history 39/week @ 2024-07-29 9/week @ 2024-09-23 17/week @ 2024-09-30

104 downloads per month
Used in 3 crates

Apache-2.0

12KB
117 lines

RusPiRo cache maintenance crate

This crates provides several cach maintenance functions that helps clearing or invalidating the cache of the Raspberry Pi. Especially when it comes to cross core and core to GPU communications (like mailbox calls) the cache need to be cleared/invalidated to ensure access to the most recent values stores in the memory.

CI Latest Version Documentation License

Usage

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

[dependencies]
ruspiro-cache = "0.4.1"

Once done the access to the cache maintenance functions is available like so:

use ruspiro-cache as cache;

fn demo() {
    cache::clean(); // clean the data cache
    cache::invalidate(); // invalidate the data cache
    cache::flush(); // clean and invalidate the data cache
}

License

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.

Dependencies

~84–365KB