Function firefly_rust::rom::load_buf

source ยท
pub fn load_buf(name: &str) -> FileBuf
Expand description

Read the whole file with the given name from ROM.

If you have a pre-allocated buffer of the right size, use load instead.

If the file does not exist, the returned buffer will be empty. This, however, should not happen in normal operation because the contents of the ROM directory are statically known.

Examples found in repository?
examples/image/main.rs (line 17)
16
17
18
19
20
21
extern fn boot() {
    let file = ff::rom::load_buf("img");
    unsafe {
        IMAGE.set(file).ok().unwrap();
    }
}