diff --git a/sw/host/opentitanlib/src/test_utils/gpio.rs b/sw/host/opentitanlib/src/test_utils/gpio.rs index 1d87f5fe87e70..d6297d723266a 100644 --- a/sw/host/opentitanlib/src/test_utils/gpio.rs +++ b/sw/host/opentitanlib/src/test_utils/gpio.rs @@ -7,7 +7,7 @@ use std::time::Duration; use crate::io::uart::Uart; use crate::test_utils::e2e_command::TestCommand; -use crate::test_utils::rpc::{UartRecv, UartSend}; +use crate::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use crate::test_utils::status::Status; // Bring in the auto-generated sources. diff --git a/sw/host/opentitanlib/src/test_utils/i2c_target.rs b/sw/host/opentitanlib/src/test_utils/i2c_target.rs index f1fe6c247a0af..83416c9a6cdd4 100644 --- a/sw/host/opentitanlib/src/test_utils/i2c_target.rs +++ b/sw/host/opentitanlib/src/test_utils/i2c_target.rs @@ -7,7 +7,7 @@ use std::time::Duration; use crate::io::uart::Uart; use crate::test_utils::e2e_command::TestCommand; -use crate::test_utils::rpc::{UartRecv, UartSend}; +use crate::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use crate::test_utils::status::Status; // Bring in the auto-generated sources. diff --git a/sw/host/opentitanlib/src/test_utils/mem.rs b/sw/host/opentitanlib/src/test_utils/mem.rs index c68ca26237d13..8ce94150a35a6 100644 --- a/sw/host/opentitanlib/src/test_utils/mem.rs +++ b/sw/host/opentitanlib/src/test_utils/mem.rs @@ -8,7 +8,7 @@ use std::time::Duration; use crate::io::uart::Uart; use crate::test_utils::e2e_command::TestCommand; -use crate::test_utils::rpc::{UartRecv, UartSend}; +use crate::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use crate::test_utils::status::Status; // Bring in the auto-generated sources. diff --git a/sw/host/opentitanlib/src/test_utils/pinmux_config.rs b/sw/host/opentitanlib/src/test_utils/pinmux_config.rs index 829f177f9b669..747a009ac9fcd 100644 --- a/sw/host/opentitanlib/src/test_utils/pinmux_config.rs +++ b/sw/host/opentitanlib/src/test_utils/pinmux_config.rs @@ -9,7 +9,7 @@ use std::time::Duration; use crate::chip::autogen::earlgrey::{PinmuxInsel, PinmuxMioOut, PinmuxOutsel, PinmuxPeripheralIn}; use crate::io::uart::Uart; use crate::test_utils::e2e_command::TestCommand; -use crate::test_utils::rpc::{UartRecv, UartSend}; +use crate::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use crate::test_utils::status::Status; // Bring in the auto-generated sources. diff --git a/sw/host/opentitanlib/src/test_utils/rpc.rs b/sw/host/opentitanlib/src/test_utils/rpc.rs index c7cba3f448f71..9e8db845b65d1 100644 --- a/sw/host/opentitanlib/src/test_utils/rpc.rs +++ b/sw/host/opentitanlib/src/test_utils/rpc.rs @@ -16,7 +16,7 @@ use crate::uart::console::{ExitStatus, UartConsole}; // Bring in the auto-generated sources. include!(env!("ottf")); -pub trait UartSend +pub trait ConsoleSend where T: ConsoleDevice + ?Sized, { @@ -24,7 +24,7 @@ where fn send_with_crc(&self, device: &T) -> Result<()>; } -impl UartSend for U +impl ConsoleSend for U where T: ConsoleDevice + ?Sized, U: Serialize, @@ -47,7 +47,7 @@ where } } -pub trait UartRecv +pub trait ConsoleRecv where T: ConsoleDevice + ?Sized, { @@ -56,7 +56,7 @@ where Self: Sized; } -impl UartRecv for U +impl ConsoleRecv for U where T: ConsoleDevice + ?Sized, U: DeserializeOwned, diff --git a/sw/host/opentitanlib/src/test_utils/spi_passthru.rs b/sw/host/opentitanlib/src/test_utils/spi_passthru.rs index 1119643955b82..22fb51c21e771 100644 --- a/sw/host/opentitanlib/src/test_utils/spi_passthru.rs +++ b/sw/host/opentitanlib/src/test_utils/spi_passthru.rs @@ -7,7 +7,7 @@ use std::time::Duration; use crate::io::uart::Uart; use crate::test_utils::e2e_command::TestCommand; -use crate::test_utils::rpc::{UartRecv, UartSend}; +use crate::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use crate::test_utils::status::Status; // Bring in the auto-generated sources. diff --git a/sw/host/provisioning/cp_lib/src/lib.rs b/sw/host/provisioning/cp_lib/src/lib.rs index b1a668a191eb7..9374f3969a0fb 100644 --- a/sw/host/provisioning/cp_lib/src/lib.rs +++ b/sw/host/provisioning/cp_lib/src/lib.rs @@ -14,7 +14,7 @@ use opentitanlib::test_utils::lc_transition::trigger_lc_transition; use opentitanlib::test_utils::load_sram_program::{ ExecutionMode, ExecutionResult, SramProgramParams, }; -use opentitanlib::test_utils::rpc::UartSend; +use opentitanlib::test_utils::rpc::ConsoleSend; use opentitanlib::uart::console::UartConsole; use ujson_lib::provisioning_data::ManufCpProvisioningData; diff --git a/sw/host/provisioning/ft_lib/src/lib.rs b/sw/host/provisioning/ft_lib/src/lib.rs index 87c7c5c054783..c9742df9ef4c0 100644 --- a/sw/host/provisioning/ft_lib/src/lib.rs +++ b/sw/host/provisioning/ft_lib/src/lib.rs @@ -25,7 +25,7 @@ use opentitanlib::test_utils::lc_transition::trigger_lc_transition; use opentitanlib::test_utils::load_sram_program::{ ExecutionMode, ExecutionResult, SramProgramParams, }; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; use ot_certs::x509::parse_certificate; use perso_tlv_lib::perso_tlv_get_field; diff --git a/sw/host/tests/chip/i2c_target/src/main.rs b/sw/host/tests/chip/i2c_target/src/main.rs index cf319f04e92fd..afd2df93ce754 100644 --- a/sw/host/tests/chip/i2c_target/src/main.rs +++ b/sw/host/tests/chip/i2c_target/src/main.rs @@ -16,7 +16,7 @@ use opentitanlib::test_utils; use opentitanlib::test_utils::e2e_command::TestCommand; use opentitanlib::test_utils::i2c_target::{I2cTargetAddress, I2cTestConfig, I2cTransferStart}; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::test_utils::status::Status; use opentitanlib::uart::console::UartConsole; use std::borrow::Borrow; diff --git a/sw/host/tests/crypto/aes_nist_kat/src/main.rs b/sw/host/tests/crypto/aes_nist_kat/src/main.rs index c57494ae2e4c0..62daec5dfaaa9 100644 --- a/sw/host/tests/crypto/aes_nist_kat/src/main.rs +++ b/sw/host/tests/crypto/aes_nist_kat/src/main.rs @@ -19,7 +19,7 @@ use cryptotest_commands::commands::CryptotestCommand; use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/drbg_kat/src/main.rs b/sw/host/tests/crypto/drbg_kat/src/main.rs index 210bf469f6724..bcc21c6ee5d1a 100644 --- a/sw/host/tests/crypto/drbg_kat/src/main.rs +++ b/sw/host/tests/crypto/drbg_kat/src/main.rs @@ -16,7 +16,7 @@ use cryptotest_commands::drbg_commands::{CryptotestDrbgInput, CryptotestDrbgOutp use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/ecdh_kat/src/main.rs b/sw/host/tests/crypto/ecdh_kat/src/main.rs index bef71be861177..6261d0e599cd1 100644 --- a/sw/host/tests/crypto/ecdh_kat/src/main.rs +++ b/sw/host/tests/crypto/ecdh_kat/src/main.rs @@ -19,7 +19,7 @@ use cryptotest_commands::ecdh_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; use p256::elliptic_curve::scalar::ScalarPrimitive as ScalarPrimitiveP256; use p256::U256; diff --git a/sw/host/tests/crypto/ecdsa_kat/src/main.rs b/sw/host/tests/crypto/ecdsa_kat/src/main.rs index dc2313c1e4733..540fb093691ba 100644 --- a/sw/host/tests/crypto/ecdsa_kat/src/main.rs +++ b/sw/host/tests/crypto/ecdsa_kat/src/main.rs @@ -31,7 +31,7 @@ use cryptotest_commands::ecdsa_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/hash_kat/src/main.rs b/sw/host/tests/crypto/hash_kat/src/main.rs index 6015dafe0bf97..b56678ee48cd2 100644 --- a/sw/host/tests/crypto/hash_kat/src/main.rs +++ b/sw/host/tests/crypto/hash_kat/src/main.rs @@ -19,7 +19,7 @@ use cryptotest_commands::hash_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/hmac_kat/src/main.rs b/sw/host/tests/crypto/hmac_kat/src/main.rs index 06b5647174782..ec1ea6a293f64 100644 --- a/sw/host/tests/crypto/hmac_kat/src/main.rs +++ b/sw/host/tests/crypto/hmac_kat/src/main.rs @@ -18,7 +18,7 @@ use cryptotest_commands::hmac_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/kmac_kat/src/main.rs b/sw/host/tests/crypto/kmac_kat/src/main.rs index 840f34d356e3a..68f1e7e83d01d 100644 --- a/sw/host/tests/crypto/kmac_kat/src/main.rs +++ b/sw/host/tests/crypto/kmac_kat/src/main.rs @@ -19,7 +19,7 @@ use cryptotest_commands::kmac_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/crypto/sphincsplus_kat/src/main.rs b/sw/host/tests/crypto/sphincsplus_kat/src/main.rs index c3bc994d24c8c..32bf25245435a 100644 --- a/sw/host/tests/crypto/sphincsplus_kat/src/main.rs +++ b/sw/host/tests/crypto/sphincsplus_kat/src/main.rs @@ -20,7 +20,7 @@ use cryptotest_commands::sphincsplus_commands::{ use opentitanlib::app::TransportWrapper; use opentitanlib::execute_test; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; #[derive(Debug, Parser)] diff --git a/sw/host/tests/manuf/cp_provision_functest/src/main.rs b/sw/host/tests/manuf/cp_provision_functest/src/main.rs index 2b6842d92fd1a..451458b04db5f 100644 --- a/sw/host/tests/manuf/cp_provision_functest/src/main.rs +++ b/sw/host/tests/manuf/cp_provision_functest/src/main.rs @@ -20,7 +20,7 @@ use opentitanlib::test_utils::lc_transition; use opentitanlib::test_utils::load_sram_program::{ ExecutionMode, ExecutionResult, SramProgramParams, }; -use opentitanlib::test_utils::rpc::UartSend; +use opentitanlib::test_utils::rpc::ConsoleSend; use opentitanlib::uart::console::UartConsole; use ujson_lib::provisioning_data::ManufCpProvisioningData; use util_lib::hash_lc_token; diff --git a/sw/host/tests/manuf/personalize_functest/src/main.rs b/sw/host/tests/manuf/personalize_functest/src/main.rs index 1563b1fb5f546..704caed753e63 100644 --- a/sw/host/tests/manuf/personalize_functest/src/main.rs +++ b/sw/host/tests/manuf/personalize_functest/src/main.rs @@ -16,7 +16,7 @@ use opentitanlib::io::jtag::JtagTap; use opentitanlib::test_utils::init::InitializeTest; use opentitanlib::test_utils::lc::read_lc_state; use opentitanlib::test_utils::lc_transition::trigger_lc_transition; -use opentitanlib::test_utils::rpc::UartSend; +use opentitanlib::test_utils::rpc::ConsoleSend; use opentitanlib::uart::console::UartConsole; use util_lib::hash_lc_token; diff --git a/sw/host/tests/rom/e2e_chip_specific_startup/src/main.rs b/sw/host/tests/rom/e2e_chip_specific_startup/src/main.rs index c47f1c402817d..08ba1efe29449 100644 --- a/sw/host/tests/rom/e2e_chip_specific_startup/src/main.rs +++ b/sw/host/tests/rom/e2e_chip_specific_startup/src/main.rs @@ -13,7 +13,7 @@ use opentitanlib::test_utils::e2e_command::TestCommand; use opentitanlib::test_utils::epmp::constants::*; use opentitanlib::test_utils::epmp::{Epmp, EpmpAddressRange, EpmpEntry, EpmpRegionKind}; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::uart::console::UartConsole; use std::time::Duration; diff --git a/sw/host/tests/rom/sw_strap_value/src/main.rs b/sw/host/tests/rom/sw_strap_value/src/main.rs index 3ae12727b630f..8565c7cf7f387 100644 --- a/sw/host/tests/rom/sw_strap_value/src/main.rs +++ b/sw/host/tests/rom/sw_strap_value/src/main.rs @@ -10,7 +10,7 @@ use opentitanlib::execute_test; use opentitanlib::io::gpio::{PinMode, PullMode}; use opentitanlib::test_utils::e2e_command::TestCommand; use opentitanlib::test_utils::init::InitializeTest; -use opentitanlib::test_utils::rpc::{UartRecv, UartSend}; +use opentitanlib::test_utils::rpc::{ConsoleRecv, ConsoleSend}; use opentitanlib::test_utils::status::Status; use opentitanlib::uart::console::UartConsole; use std::time::Duration;