Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cfloader-rs

Rust library for interfacing with the Crazyflie 2.x bootloader over Crazyradio.

Supported platforms

  • Crazyflie 2.0
  • Crazyflie 2.1
  • Crazyflie Bolt
  • Crazyflie Brushless 2.1

Usage

Add to your Cargo.toml:

[dependencies]
cfloader = "0.1"

This crate is using async and requires Tokio.

Example

use cfloader::{Bllink, CFLoader};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let bllink = Bllink::new(None).await?;
    let mut loader = CFLoader::new(bllink).await?;

    // Flash firmware to STM32
    let firmware = std::fs::read("firmware.bin")?;
    loader.flash_stm32(0x8000, &firmware).await?;

    // Reset to normal operation
    loader.reset_to_firmware().await?;
    Ok(())
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust implementation of the host-side Crazyflie bootloader protocol

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages