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
12 changes: 6 additions & 6 deletions framework_lib/src/chromium_ec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ pub mod commands;
mod cros_ec;
pub mod i2c_passthrough;
pub mod input_deck;
#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
mod portio;
#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
mod portio_hwio;
#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
mod portio_mec;
#[allow(dead_code)]
mod protocol;
Expand Down Expand Up @@ -243,7 +243,7 @@ fn available_drivers() -> Vec<CrosEcDriverType> {
drivers.push(CrosEcDriverType::CrosEc);
}

#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
drivers.push(CrosEcDriverType::Portio);

drivers
Expand Down Expand Up @@ -1897,7 +1897,7 @@ impl CrosEcDriver for CrosEc {

// TODO: Change this function to return EcResult instead and print the error only in UI code
print_err(match self.driver {
#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
CrosEcDriverType::Portio => portio::read_memory(offset, length),
#[cfg(windows)]
CrosEcDriverType::Windows => windows::read_memory(offset, length),
Expand All @@ -1919,7 +1919,7 @@ impl CrosEcDriver for CrosEc {
}

match self.driver {
#[cfg(all(not(windows), any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(all(not(windows), target_arch = "x86_64"))]
CrosEcDriverType::Portio => portio::send_command(command, command_version, data),
#[cfg(windows)]
CrosEcDriverType::Windows => windows::send_command(command, command_version, data),
Expand Down
Loading