From 3e6f3866fb6aac2dcb3dc18784ea255f81000ee2 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Sun, 9 Feb 2025 15:06:14 +0800 Subject: [PATCH 1/2] ccgx: Format PD version as decimal on 11th Gen Signed-off-by: Daniel Schaefer --- framework_lib/src/ccgx/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/framework_lib/src/ccgx/mod.rs b/framework_lib/src/ccgx/mod.rs index 71f187b1..8c8f89d2 100644 --- a/framework_lib/src/ccgx/mod.rs +++ b/framework_lib/src/ccgx/mod.rs @@ -1,5 +1,6 @@ //! Interact with Infineon (formerly Cypress) PD controllers (their firmware binaries) in the CCGx series +use alloc::format; use alloc::string::String; use alloc::string::ToString; #[cfg(feature = "uefi")] @@ -117,6 +118,14 @@ pub struct BaseVersion { /// Build Number part of the version. PP of X.Y.Z.BB pub build_number: u16, } +impl BaseVersion { + pub fn to_dec_string(&self) -> String { + format!( + "{}.{}.{}.{:0>3}", + self.major, self.minor, self.patch, self.build_number + ) + } +} impl fmt::Display for BaseVersion { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( @@ -215,8 +224,9 @@ impl ControllerFirmwares { pub fn active_fw_ver(&self) -> String { let active = self.active_fw(); // On 11th Gen we modified base version instead of app version + // And it's formatted as decimal instead of hex if let Some(Platform::IntelGen11) = smbios::get_platform() { - active.base.to_string() + active.base.to_dec_string() } else { active.app.to_string() } From 759a55b0f6bcd5b379a135974f92d8bf080d7392 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 13 Feb 2025 09:37:49 +0800 Subject: [PATCH 2/2] Bump to v0.2.1 Signed-off-by: Daniel Schaefer --- Cargo.lock | 6 +++--- framework_lib/Cargo.toml | 2 +- framework_tool/Cargo.toml | 2 +- framework_uefi/Cargo.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25e0ca18..f2cb24fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -379,7 +379,7 @@ dependencies = [ [[package]] name = "framework_lib" -version = "0.2.0" +version = "0.2.1" dependencies = [ "built", "clap", @@ -410,7 +410,7 @@ dependencies = [ [[package]] name = "framework_tool" -version = "0.2.0" +version = "0.2.1" dependencies = [ "framework_lib", "static_vcruntime", @@ -418,7 +418,7 @@ dependencies = [ [[package]] name = "framework_uefi" -version = "0.2.0" +version = "0.2.1" dependencies = [ "framework_lib", "log", diff --git a/framework_lib/Cargo.toml b/framework_lib/Cargo.toml index 884aab04..3dadedf9 100644 --- a/framework_lib/Cargo.toml +++ b/framework_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_lib" -version = "0.2.0" +version = "0.2.1" edition = "2021" # Minimum Supported Rust Version # Ubuntu 24.04 LTS ships 1.75 diff --git a/framework_tool/Cargo.toml b/framework_tool/Cargo.toml index 06defaae..f4d3bfa9 100644 --- a/framework_tool/Cargo.toml +++ b/framework_tool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_tool" -version = "0.2.0" +version = "0.2.1" edition = "2021" [features] diff --git a/framework_uefi/Cargo.toml b/framework_uefi/Cargo.toml index 8323fc84..a8e579b0 100644 --- a/framework_uefi/Cargo.toml +++ b/framework_uefi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_uefi" -version = "0.2.0" +version = "0.2.1" edition = "2021" # Minimum Supported Rust Version rust-version = "1.74" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy