From 6bcf965f4116a9f7c05745cce8f2a960d4b4a29c Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 16 Mar 2026 23:31:37 +0800 Subject: [PATCH 1/9] laptop13: Support input deck related commands - Mostly update documentation - `--inputdeck-mode` already works as long as the host command is present - `--inputdeck` now attempts to use the host command to print the status Signed-off-by: Daniel Schaefer --- EXAMPLES.md | 4 ++-- framework_lib/src/chromium_ec/command.rs | 2 +- framework_lib/src/chromium_ec/mod.rs | 6 ++++++ framework_lib/src/commandline/clap_std.rs | 4 ++-- framework_lib/src/commandline/mod.rs | 2 +- framework_tool/completions/fish/framework_tool.fish | 4 ++-- framework_tool/completions/zsh/_framework_tool | 4 ++-- support-matrices.md | 2 +- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 420d06e..13a6f5d 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -80,9 +80,9 @@ Options: --intrusion Show status of intrusion switch --inputdeck - Show status of the input modules (Framework 16 only) + Show status of the input modules --inputdeck-mode - Set input deck power mode [possible values: auto, off, on] (Framework 16 only) [possible values: auto, off, on] + Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) [possible values: auto, off, on] --expansion-bay Show status of the expansion bay (Framework 16 only) --charge-limit [] diff --git a/framework_lib/src/chromium_ec/command.rs b/framework_lib/src/chromium_ec/command.rs index 07bf4d3..7462ef1 100644 --- a/framework_lib/src/chromium_ec/command.rs +++ b/framework_lib/src/chromium_ec/command.rs @@ -90,7 +90,7 @@ pub enum EcCommands { PriavcySwitchesCheckMode = 0x3E14, /// Not used by this library ChassisCounter = 0x3E15, - /// On Framework 16, check the status of the input module deck + /// Check the status of the input module deck (Framework 13 and 16) CheckDeckState = 0x3E16, /// Not used by this library GetSimpleVersion = 0x3E17, diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 7921830..38e3e90 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -674,6 +674,12 @@ impl CrosEc { println!("Input Deck"); println!(" Chassis Closed: {}", !intrusion.currently_open); + + if let Ok(status) = self.get_input_deck_status() { + println!(" Deck State: {:?}", status.state); + println!(" Touchpad present: {}", status.touchpad_present); + } + println!( " Audio Daughterboard: {}", if let Some(audio) = audio { diff --git a/framework_lib/src/commandline/clap_std.rs b/framework_lib/src/commandline/clap_std.rs index df1bb77..978380e 100644 --- a/framework_lib/src/commandline/clap_std.rs +++ b/framework_lib/src/commandline/clap_std.rs @@ -163,11 +163,11 @@ struct ClapCli { #[arg(long)] intrusion: bool, - /// Show status of the input modules (Framework 16 only) + /// Show status of the input modules #[arg(long)] inputdeck: bool, - /// Set input deck power mode [possible values: auto, off, on] (Framework 16 only) + /// Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) #[arg(long)] inputdeck_mode: Option, diff --git a/framework_lib/src/commandline/mod.rs b/framework_lib/src/commandline/mod.rs index fa47287..840f895 100644 --- a/framework_lib/src/commandline/mod.rs +++ b/framework_lib/src/commandline/mod.rs @@ -1855,7 +1855,7 @@ Options: --s0ix-counter Show S0ix counter --intrusion Show status of intrusion switch --inputdeck Show status of the input deck - --inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 16 only) + --inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) --expansion-bay Show status of the expansion bay (Framework 16 only) --nvidia Show NVIDIA GPU information (Framework 16 only) --charge-limit [] Get or set battery charge limit (Percentage number as arg, e.g. '100') diff --git a/framework_tool/completions/fish/framework_tool.fish b/framework_tool/completions/fish/framework_tool.fish index 9bb27b5..a5c708b 100644 --- a/framework_tool/completions/fish/framework_tool.fish +++ b/framework_tool/completions/fish/framework_tool.fish @@ -26,7 +26,7 @@ complete -c framework_tool -l flash-full-ec -d 'Flash full EC flash with new fir complete -c framework_tool -l flash-ec -d 'Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!' -r -F complete -c framework_tool -l flash-ro-ec -d 'Flash EC with new RO firmware from file - may render your hardware unbootable!' -r -F complete -c framework_tool -l flash-rw-ec -d 'Flash EC with new RW firmware from file' -r -F -complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Framework 16 only)' -r -f -a "auto\t'' +complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16)' -r -f -a "auto\t'' off\t'' on\t''" complete -c framework_tool -l charge-limit -d 'Get or set max charge limit' -r @@ -87,7 +87,7 @@ complete -c framework_tool -l dp-hdmi-info -d 'Show details about connected DP o complete -c framework_tool -l audio-card-info -d 'Show details about connected Audio Expansion Cards (Needs root privileges)' complete -c framework_tool -l privacy -d 'Show privacy switch statuses (camera and microphone)' complete -c framework_tool -l intrusion -d 'Show status of intrusion switch' -complete -c framework_tool -l inputdeck -d 'Show status of the input modules (Framework 16 only)' +complete -c framework_tool -l inputdeck -d 'Show status of the input modules' complete -c framework_tool -l expansion-bay -d 'Show status of the expansion bay (Framework 16 only)' complete -c framework_tool -l stylus-battery -d 'Check stylus battery level (USI 2.0 stylus only)' complete -c framework_tool -l uptimeinfo diff --git a/framework_tool/completions/zsh/_framework_tool b/framework_tool/completions/zsh/_framework_tool index 6a67a10..9ee4c40 100644 --- a/framework_tool/completions/zsh/_framework_tool +++ b/framework_tool/completions/zsh/_framework_tool @@ -36,7 +36,7 @@ _framework_tool() { '--flash-ec=[Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!]:FLASH_EC:_files' \ '--flash-ro-ec=[Flash EC with new RO firmware from file - may render your hardware unbootable!]:FLASH_RO_EC:_files' \ '--flash-rw-ec=[Flash EC with new RW firmware from file]:FLASH_RW_EC:_files' \ -'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Framework 16 only)]:INPUTDECK_MODE:(auto off on)' \ +'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Framework 13 and 16)]:INPUTDECK_MODE:(auto off on)' \ '--charge-limit=[Get or set max charge limit]::CHARGE_LIMIT:_default' \ '*--charge-current-limit=[Set max charge current limit]:CHARGE_CURRENT_LIMIT:_default' \ '*--charge-rate-limit=[Set max charge current limit]:CHARGE_RATE_LIMIT:_default' \ @@ -78,7 +78,7 @@ _framework_tool() { '--audio-card-info[Show details about connected Audio Expansion Cards (Needs root privileges)]' \ '--privacy[Show privacy switch statuses (camera and microphone)]' \ '--intrusion[Show status of intrusion switch]' \ -'--inputdeck[Show status of the input modules (Framework 16 only)]' \ +'--inputdeck[Show status of the input modules]' \ '--expansion-bay[Show status of the expansion bay (Framework 16 only)]' \ '--stylus-battery[Check stylus battery level (USI 2.0 stylus only)]' \ '--uptimeinfo[]' \ diff --git a/support-matrices.md b/support-matrices.md index faf7bf5..32f9d37 100644 --- a/support-matrices.md +++ b/support-matrices.md @@ -42,7 +42,7 @@ | `--privacy` | EC Communication | All Laptops | | `--intrusion` | EC Communication | All Laptops | | `--inputdeck` | EC Communication | All Laptops | -| `--inputdeck-mode` | EC Communication | Framework 16 | +| `--inputdeck-mode` | EC Communication | Framework 13, 16 | | `--console` | EC Communication | All | | `--get-gpio` | EC Communication | All | | `--kblight` | EC Communication | Framework 13 | From 4faef7d1f009d4941b1da9ed99ebc033867ae7a3 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 17 Mar 2026 18:06:15 +0800 Subject: [PATCH 2/9] --inputdeck, --inputdeck-mode: Add another fallback If no platform matches and 16 inch gpio is not present, just try the host command. Since lilac the input deck (touchpad) is detected, similarly to laptop 16. Signed-off-by: Daniel Schaefer --- framework_lib/src/commandline/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework_lib/src/commandline/mod.rs b/framework_lib/src/commandline/mod.rs index 840f895..ae43c5d 100644 --- a/framework_lib/src/commandline/mod.rs +++ b/framework_lib/src/commandline/mod.rs @@ -1360,7 +1360,15 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 { if ec.get_gpio("sleep_l").is_ok() { ec.print_fw16_inputdeck_status() } else { - println!(" Unable to tell"); + if let Ok(status) = ec.get_input_deck_status() { + println!(" Deck State: {:?}", status.state); + println!( + " Touchpad present: {} ({})", + status.touchpad_present, status.touchpad_id + ); + } else { + println!(" Unable to tell"); + } Ok(()) } } From a45118fd8aceb54195a0e77c40e2add6c0ab8992 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 17 Mar 2026 18:17:23 +0800 Subject: [PATCH 3/9] touchpad_present: Relax check a bit The laptop 13 touchpad does not have the same board ID as on laptop 16. Signed-off-by: Daniel Schaefer --- framework_lib/src/chromium_ec/input_deck.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/framework_lib/src/chromium_ec/input_deck.rs b/framework_lib/src/chromium_ec/input_deck.rs index 28a20df..6892068 100644 --- a/framework_lib/src/chromium_ec/input_deck.rs +++ b/framework_lib/src/chromium_ec/input_deck.rs @@ -136,6 +136,7 @@ pub struct InputDeckStatus { pub state: InputDeckState, pub hubboard_present: bool, pub touchpad_present: bool, + pub touchpad_id: u8, pub top_row: TopRowPositions, } @@ -177,16 +178,20 @@ impl InputDeckStatus { impl From for InputDeckStatus { fn from(item: EcResponseDeckState) -> Self { + let tp_id = InputModuleType::from(item.board_id[InputDeckMux::Touchpad as usize]); + let tp_present = !matches!( + tp_id, + InputModuleType::Short | InputModuleType::Disconnected + ); + InputDeckStatus { state: InputDeckState::from(item.deck_state), hubboard_present: matches!( InputModuleType::from(item.board_id[InputDeckMux::HubBoard as usize],), InputModuleType::HubBoard ), - touchpad_present: matches!( - InputModuleType::from(item.board_id[InputDeckMux::Touchpad as usize],), - InputModuleType::Touchpad - ), + touchpad_present: tp_present, + touchpad_id: item.board_id[InputDeckMux::Touchpad as usize], top_row: TopRowPositions { pos0: InputModuleType::from(item.board_id[InputDeckMux::TopRow0 as usize]), pos1: InputModuleType::from(item.board_id[InputDeckMux::TopRow1 as usize]), From af3c10dafe44b22e7d276f13732f7a4ee7a75018 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:19:33 +0800 Subject: [PATCH 4/9] laptop12: Use correct board ID decoding It's based on npcx Signed-off-by: Daniel Schaefer --- framework_lib/src/chromium_ec/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 38e3e90..fd13272 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -638,17 +638,17 @@ impl CrosEc { pub fn print_fw12_inputdeck_status(&self) -> EcResult<()> { let intrusion = self.get_intrusion_status()?; - let pwrbtn = self.read_board_id(Framework12Adc::PowerButtonBoardId as u8)?; - let audio = self.read_board_id(Framework12Adc::AudioBoardId as u8)?; - let tp = self.read_board_id(Framework12Adc::TouchpadBoardId as u8)?; + let pwrbtn = self.read_board_id_npc_db(Framework12Adc::PowerButtonBoardId as u8)?; + let audio = self.read_board_id_npc_db(Framework12Adc::AudioBoardId as u8)?; + let tp = self.read_board_id_npc_db(Framework12Adc::TouchpadBoardId as u8)?; let is_present = |p| if p { "Present" } else { "Missing" }; println!("Input Deck"); println!(" Chassis Closed: {}", !intrusion.currently_open); - println!(" Power Button Board: {}", is_present(pwrbtn.is_some())); - println!(" Audio Daughterboard: {}", is_present(audio.is_some())); - println!(" Touchpad: {}", is_present(tp.is_some())); + println!(" Power Button Board: {} ({:?})", is_present(pwrbtn.is_some()), pwrbtn); + println!(" Audio Daughterboard: {} ({:?})", is_present(audio.is_some()), audio); + println!(" Touchpad: {} ({:?})", is_present(tp.is_some()), tp); Ok(()) } From 278a7c7f9868bb099ca44b80dca663cb0b510ef2 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:21:21 +0800 Subject: [PATCH 5/9] laptop12: --inputdeck use host command if available Signed-off-by: Daniel Schaefer --- framework_lib/src/chromium_ec/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index fd13272..b0f1a8d 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -650,6 +650,11 @@ impl CrosEc { println!(" Audio Daughterboard: {} ({:?})", is_present(audio.is_some()), audio); println!(" Touchpad: {} ({:?})", is_present(tp.is_some()), tp); + if let Ok(status) = self.get_input_deck_status() { + println!(" Deck State: {:?}", status.state); + println!(" Touchpad present: {}", status.touchpad_present); + } + Ok(()) } From 73118fe11d0dccd9fa72bd107e277f52fadf2b47 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:25:25 +0800 Subject: [PATCH 6/9] laptop12: --inputdeck show exact ADC values > sudo framework_tool --inputdeck Input Deck Chassis Closed: true Power Button Board: Present (10) ADC Value (mV) Ok(1655) Audio Daughterboard: Present (2) ADC Value (mV) Ok(302) Touchpad: Present (10) ADC Value (mV) Ok(1655) Signed-off-by: Daniel Schaefer --- framework_lib/src/chromium_ec/mod.rs | 39 +++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index b0f1a8d..2e924d1 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -646,9 +646,42 @@ impl CrosEc { println!("Input Deck"); println!(" Chassis Closed: {}", !intrusion.currently_open); - println!(" Power Button Board: {} ({:?})", is_present(pwrbtn.is_some()), pwrbtn); - println!(" Audio Daughterboard: {} ({:?})", is_present(audio.is_some()), audio); - println!(" Touchpad: {} ({:?})", is_present(tp.is_some()), tp); + println!( + " Power Button Board: {}", + if let Some(pwrbtn) = pwrbtn { + format!("{} ({})", is_present(true), pwrbtn) + } else { + is_present(false).to_string() + } + ); + println!( + " ADC Value (mV) {:?}", + self.adc_read(Framework12Adc::PowerButtonBoardId as u8) + ); + println!( + " Audio Daughterboard: {}", + if let Some(audio) = audio { + format!("{} ({})", is_present(true), audio) + } else { + is_present(false).to_string() + } + ); + println!( + " ADC Value (mV) {:?}", + self.adc_read(Framework12Adc::AudioBoardId as u8) + ); + println!( + " Touchpad: {}", + if let Some(tp) = tp { + format!("{} ({})", is_present(true), tp) + } else { + is_present(false).to_string() + } + ); + println!( + " ADC Value (mV) {:?}", + self.adc_read(Framework12Adc::TouchpadBoardId as u8) + ); if let Ok(status) = self.get_input_deck_status() { println!(" Deck State: {:?}", status.state); From 824af5ff48d8a32fade719e1e1e07c34b213c6e1 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:34:39 +0800 Subject: [PATCH 7/9] --inputdeck-mode: Mention laptop 12 Not implemented yet, but may come soon in EC. Signed-off-by: Daniel Schaefer --- EXAMPLES.md | 2 +- framework_lib/src/chromium_ec/command.rs | 2 +- framework_lib/src/commandline/clap_std.rs | 2 +- framework_lib/src/commandline/mod.rs | 2 +- framework_tool/completions/fish/framework_tool.fish | 2 +- framework_tool/completions/zsh/_framework_tool | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 13a6f5d..3bf9ddb 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -82,7 +82,7 @@ Options: --inputdeck Show status of the input modules --inputdeck-mode - Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) [possible values: auto, off, on] + Set input deck power mode [possible values: auto, off, on] (Laptop 12, 13, 16) [possible values: auto, off, on] --expansion-bay Show status of the expansion bay (Framework 16 only) --charge-limit [] diff --git a/framework_lib/src/chromium_ec/command.rs b/framework_lib/src/chromium_ec/command.rs index 7462ef1..5e7351a 100644 --- a/framework_lib/src/chromium_ec/command.rs +++ b/framework_lib/src/chromium_ec/command.rs @@ -90,7 +90,7 @@ pub enum EcCommands { PriavcySwitchesCheckMode = 0x3E14, /// Not used by this library ChassisCounter = 0x3E15, - /// Check the status of the input module deck (Framework 13 and 16) + /// Check the status of the input module deck (Laptop 12, 13, 16) CheckDeckState = 0x3E16, /// Not used by this library GetSimpleVersion = 0x3E17, diff --git a/framework_lib/src/commandline/clap_std.rs b/framework_lib/src/commandline/clap_std.rs index 978380e..f435f8c 100644 --- a/framework_lib/src/commandline/clap_std.rs +++ b/framework_lib/src/commandline/clap_std.rs @@ -167,7 +167,7 @@ struct ClapCli { #[arg(long)] inputdeck: bool, - /// Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) + /// Set input deck power mode [possible values: auto, off, on] (Laptop 12, 13, 16) #[arg(long)] inputdeck_mode: Option, diff --git a/framework_lib/src/commandline/mod.rs b/framework_lib/src/commandline/mod.rs index ae43c5d..ea2b99b 100644 --- a/framework_lib/src/commandline/mod.rs +++ b/framework_lib/src/commandline/mod.rs @@ -1863,7 +1863,7 @@ Options: --s0ix-counter Show S0ix counter --intrusion Show status of intrusion switch --inputdeck Show status of the input deck - --inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16) + --inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 12, 13, 16) --expansion-bay Show status of the expansion bay (Framework 16 only) --nvidia Show NVIDIA GPU information (Framework 16 only) --charge-limit [] Get or set battery charge limit (Percentage number as arg, e.g. '100') diff --git a/framework_tool/completions/fish/framework_tool.fish b/framework_tool/completions/fish/framework_tool.fish index a5c708b..7ae87da 100644 --- a/framework_tool/completions/fish/framework_tool.fish +++ b/framework_tool/completions/fish/framework_tool.fish @@ -26,7 +26,7 @@ complete -c framework_tool -l flash-full-ec -d 'Flash full EC flash with new fir complete -c framework_tool -l flash-ec -d 'Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!' -r -F complete -c framework_tool -l flash-ro-ec -d 'Flash EC with new RO firmware from file - may render your hardware unbootable!' -r -F complete -c framework_tool -l flash-rw-ec -d 'Flash EC with new RW firmware from file' -r -F -complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Framework 13 and 16)' -r -f -a "auto\t'' +complete -c framework_tool -l inputdeck-mode -d 'Set input deck power mode [possible values: auto, off, on] (Laptop 12, 13, 16)' -r -f -a "auto\t'' off\t'' on\t''" complete -c framework_tool -l charge-limit -d 'Get or set max charge limit' -r diff --git a/framework_tool/completions/zsh/_framework_tool b/framework_tool/completions/zsh/_framework_tool index 9ee4c40..aeeedb7 100644 --- a/framework_tool/completions/zsh/_framework_tool +++ b/framework_tool/completions/zsh/_framework_tool @@ -36,7 +36,7 @@ _framework_tool() { '--flash-ec=[Flash EC (RO+RW) with new firmware from file - may render your hardware unbootable!]:FLASH_EC:_files' \ '--flash-ro-ec=[Flash EC with new RO firmware from file - may render your hardware unbootable!]:FLASH_RO_EC:_files' \ '--flash-rw-ec=[Flash EC with new RW firmware from file]:FLASH_RW_EC:_files' \ -'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Framework 13 and 16)]:INPUTDECK_MODE:(auto off on)' \ +'--inputdeck-mode=[Set input deck power mode \[possible values\: auto, off, on\] (Laptop 12, 13, 16)]:INPUTDECK_MODE:(auto off on)' \ '--charge-limit=[Get or set max charge limit]::CHARGE_LIMIT:_default' \ '*--charge-current-limit=[Set max charge current limit]:CHARGE_CURRENT_LIMIT:_default' \ '*--charge-rate-limit=[Set max charge current limit]:CHARGE_RATE_LIMIT:_default' \ From ea65c30fb7621fadebcf47b37d5678be09ad3b0a Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:40:12 +0800 Subject: [PATCH 8/9] --inputdeck: Print ADC value more cleanly Signed-off-by: Daniel Schaefer --- EXAMPLES.md | 9 ++++--- framework_lib/src/chromium_ec/mod.rs | 35 ++++++++++++---------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 3bf9ddb..83808d1 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -349,9 +349,12 @@ ESRT Entry 3 > framework_tool --inputdeck Input Deck Chassis Closed: true - Power Button Board: Present - Audio Daughterboard: Present - Touchpad: Present + Power Button Board: Present (10) + ADC Value 1655mV + Audio Daughterboard: Present (2) + ADC Value 0302mV + Touchpad: Present (10) + ADC Value 1655mV ``` ### On Framework 13 diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 2e924d1..6c454da 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -654,10 +654,9 @@ impl CrosEc { is_present(false).to_string() } ); - println!( - " ADC Value (mV) {:?}", - self.adc_read(Framework12Adc::PowerButtonBoardId as u8) - ); + if let Ok(adc) = self.adc_read(Framework12Adc::PowerButtonBoardId as u8) { + println!(" ADC Value {:04}mV", adc); + } println!( " Audio Daughterboard: {}", if let Some(audio) = audio { @@ -666,10 +665,9 @@ impl CrosEc { is_present(false).to_string() } ); - println!( - " ADC Value (mV) {:?}", - self.adc_read(Framework12Adc::AudioBoardId as u8) - ); + if let Ok(adc) = self.adc_read(Framework12Adc::AudioBoardId as u8) { + println!(" ADC Value {:04}mV", adc); + } println!( " Touchpad: {}", if let Some(tp) = tp { @@ -678,10 +676,9 @@ impl CrosEc { is_present(false).to_string() } ); - println!( - " ADC Value (mV) {:?}", - self.adc_read(Framework12Adc::TouchpadBoardId as u8) - ); + if let Ok(adc) = self.adc_read(Framework12Adc::TouchpadBoardId as u8) { + println!(" ADC Value {:04}mV", adc); + } if let Ok(status) = self.get_input_deck_status() { println!(" Deck State: {:?}", status.state); @@ -726,10 +723,9 @@ impl CrosEc { is_present(false).to_string() } ); - println!( - " ADC Value (mV) {:?}", - self.adc_read(Framework13Adc::AudioBoardId as u8) - ); + if let Ok(adc) = self.adc_read(Framework13Adc::AudioBoardId as u8) { + println!(" ADC Value {:04}mV", adc); + } println!( " Touchpad: {}", if let Some(tp) = tp { @@ -738,10 +734,9 @@ impl CrosEc { is_present(false).to_string() } ); - println!( - " ADC Value (mV) {:?}", - self.adc_read(Framework13Adc::TouchpadBoardId as u8) - ); + if let Ok(adc) = self.adc_read(Framework13Adc::TouchpadBoardId as u8) { + println!(" ADC Value {:04}mV", adc); + } Ok(()) } From 93dc1d4b2319539e00d7c32f6b67bea2a7ae8981 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 25 Mar 2026 19:44:37 +0800 Subject: [PATCH 9/9] --inputdeck: Add laptop13 example output Signed-off-by: Daniel Schaefer --- EXAMPLES.md | 8 ++++++-- framework_lib/src/chromium_ec/mod.rs | 10 +++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 83808d1..eda71ae 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -363,8 +363,12 @@ Input Deck > framework_tool --inputdeck Input Deck Chassis Closed: true - Audio Daughterboard: Present - Touchpad: Present + Audio Daughterboard: Present (7) + ADC Value 1056mV + Touchpad: Present (7) + ADC Value 1042mV + Deck State: On + Touchpad present: true ``` ### On Framework 16 diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 6c454da..5709729 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -710,11 +710,6 @@ impl CrosEc { println!("Input Deck"); println!(" Chassis Closed: {}", !intrusion.currently_open); - if let Ok(status) = self.get_input_deck_status() { - println!(" Deck State: {:?}", status.state); - println!(" Touchpad present: {}", status.touchpad_present); - } - println!( " Audio Daughterboard: {}", if let Some(audio) = audio { @@ -738,6 +733,11 @@ impl CrosEc { println!(" ADC Value {:04}mV", adc); } + if let Ok(status) = self.get_input_deck_status() { + println!(" Deck State: {:?}", status.state); + println!(" Touchpad present: {}", status.touchpad_present); + } + Ok(()) }