Skip to content
Snippets Groups Projects

Add firmware version consistency check in Rust API

Merged Samuel Tardieu requested to merge rust-firmware-consistency into main
Files
6
@@ -9,12 +9,8 @@ use tele0592::{
use crate::elf_loader::Segment;
fn version_from_bytes(bytes: [u8; 3]) -> Version {
Version::new(
u64::from(bytes[0]),
u64::from(bytes[1]),
u64::from(bytes[2]),
)
fn version_from_bytes((major, minor, patch): (u8, u8, u8)) -> Version {
Version::new(u64::from(major), u64::from(minor), u64::from(patch))
}
pub enum ActiveProgram {
Loading