feat: migrate to parking_lot mutex and add system control architecture
This commit is contained in:
parent
14060e15e5
commit
54144d10e9
29 changed files with 2387 additions and 1130 deletions
|
|
@ -13,7 +13,7 @@ use rusty_emu::pin::PinValue;
|
|||
/// Test helper to set pin value with proper driver management
|
||||
fn set_pin_value(component: &Intel4003, pin_name: &str, value: PinValue, driver: &str) {
|
||||
if let Ok(pin) = component.get_pin(pin_name) {
|
||||
if let Ok(mut pin_guard) = pin.lock() {
|
||||
if let Some(mut pin_guard) = pin.try_lock() {
|
||||
pin_guard.set_driver(Some(driver.to_string()), value);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ fn set_pin_value(component: &Intel4003, pin_name: &str, value: PinValue, driver:
|
|||
/// Test helper to remove pin driver
|
||||
fn remove_pin_driver(component: &Intel4003, pin_name: &str) {
|
||||
if let Ok(pin) = component.get_pin(pin_name) {
|
||||
if let Ok(mut pin_guard) = pin.lock() {
|
||||
if let Some(mut pin_guard) = pin.try_lock() {
|
||||
pin_guard.set_driver(None, PinValue::HighZ);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue