Skip to content

Commit f0cd58a

Browse files
committed
fixup! --expansion-bay: Print PCIe config
1 parent 6a30a98 commit f0cd58a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

EXAMPLES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ Expansion Bay
225225
Door closed: true
226226
Board: DualInterposer
227227
Serial Number: FRAXXXXXXXXXXXXXXX
228+
Config: Pcie4x2
229+
Vendor: SsdHolder
228230
```
229231

230232
## Check charger and battery status (Framework 12/13/16)

framework_lib/src/chromium_ec/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,8 +1003,16 @@ impl CrosEc {
10031003
let res = EcRequestGetGpuPcie {}.send_command(self)?;
10041004
let config: Option<GpuPcieConfig> = FromPrimitive::from_u8(res.gpu_pcie_config);
10051005
let vendor: Option<GpuVendor> = FromPrimitive::from_u8(res.gpu_vendor);
1006-
println!(" Config: {:?}", vendor);
1007-
println!(" Vendor: {:?}", config);
1006+
if let Some(config) = config {
1007+
println!(" Config: {:?}", config);
1008+
} else {
1009+
println!(" Config: Unknown ({})", res.gpu_pcie_config);
1010+
}
1011+
if let Some(vendor) = vendor {
1012+
println!(" Vendor: {:?}", vendor);
1013+
} else {
1014+
println!(" Vendor: Unknown ({})", res.gpu_vendor);
1015+
}
10081016

10091017
Ok(())
10101018
}

0 commit comments

Comments
 (0)