Skip to content

Commit

Permalink
chromium_ec: Fix Expansion Bay Board ID
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Nov 1, 2023
1 parent b7207a6 commit 4b7547a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework_lib/src/chromium_ec/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,15 @@ impl EcResponseExpansionBayStatus {
self.state & (ExpansionByStates::HatchSwitchClosed as u8) != 0
}
pub fn expansion_bay_board(&self) -> Result<ExpansionBayBoard, ExpansionBayIssue> {
match (self.board_id_1, self.board_id_0) {
match (self.board_id_0, self.board_id_1) {
(BOARD_VERSION_12, BOARD_VERSION_12) => Ok(ExpansionBayBoard::DualInterposer),
(BOARD_VERSION_13, BOARD_VERSION_15) => Ok(ExpansionBayBoard::UmaFans),
(BOARD_VERSION_11, BOARD_VERSION_15) => Ok(ExpansionBayBoard::SingleInterposer),
(BOARD_VERSION_15, BOARD_VERSION_15) => Err(ExpansionBayIssue::NoModule),
// Invalid board IDs. Something wrong, could be interposer not connected
_ => Err(ExpansionBayIssue::BadConnection(
self.board_id_1,
self.board_id_0,
self.board_id_1,
)),
}
}
Expand Down

0 comments on commit 4b7547a

Please sign in to comment.