Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions framework_lib/src/chromium_ec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ pub enum Framework16Adc {

const BOARD_VERSION_COUNT: usize = 16;
const BOARD_VERSION: [i32; BOARD_VERSION_COUNT] = [
85, 233, 360, 492, 649, 844, 965, 1094, 1380, 1562, 1710, 2040, 2197, 2557, 2766, 2814,
203, 409, 615, 821, 1028, 1234, 1440, 1646, 1853, 2059, 2265, 2471, 2678, 2884, 3090, 3300,
];

const BOARD_VERSION_NPC_DB: [i32; BOARD_VERSION_COUNT] = [
100, 311, 521, 721, 931, 1131, 1341, 1551, 1751, 1961, 2171, 2370, 2580, 2780, 2990, 3200,
85, 233, 360, 492, 649, 844, 965, 1094, 1380, 1562, 1710, 2040, 2197, 2557, 2766, 2814,
];

pub trait CrosEcDriver {
Expand Down Expand Up @@ -594,8 +594,30 @@ impl CrosEc {

println!("Input Deck");
println!(" Chassis Closed: {}", !intrusion.currently_open);
println!(" Audio Daughterboard: {}", is_present(audio.is_some()));
println!(" Touchpad: {}", is_present(tp.is_some()));
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(Framework13Adc::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(Framework13Adc::TouchpadBoardId as u8)
);

Ok(())
}
Expand Down
Loading