fix interrupts (broke them trying to do some exceptional error handling)

This commit is contained in:
bunnie 2022-07-11 04:39:10 +08:00
parent 2ad7ed10d6
commit 3ee086b257
2 changed files with 3 additions and 5 deletions

View file

@ -319,6 +319,7 @@ pub enum ComIntSources {
Disconnect,
Connect,
WfxErr,
IntErr,
Invalid,
}
impl From<u16> for ComIntSources {
@ -334,6 +335,7 @@ impl From<u16> for ComIntSources {
com_rs_ref::INT_WLAN_DISCONNECT => ComIntSources::Disconnect,
com_rs_ref::INT_WLAN_CONNECT_EVENT => ComIntSources::Connect,
com_rs_ref::INT_WLAN_WFX_ERR => ComIntSources::WfxErr,
com_rs_ref::INT_INVALID => ComIntSources::IntErr,
_ => ComIntSources::Invalid,
}
}
@ -351,6 +353,7 @@ impl From<ComIntSources> for u16 {
ComIntSources::Connect => com_rs_ref::INT_WLAN_CONNECT_EVENT,
ComIntSources::Disconnect => com_rs_ref::INT_WLAN_DISCONNECT,
ComIntSources::WfxErr => com_rs_ref::INT_WLAN_WFX_ERR,
ComIntSources::IntErr => com_rs_ref::INT_INVALID,
ComIntSources::Invalid => 0,
}
}

View file

@ -642,11 +642,6 @@ impl Com {
rxlen = Some(maybe_rxlen as u16);
}
}
} else {
// Trip an error if we had an invalid interrupt. This should force the caller
// to re-initialize the interrupt subsystem.
log::warn!("Invalid interrupt set");
return Err(xous::Error::Timeout);
}
mask_bit <<= 1;
}