mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
fix interrupts (broke them trying to do some exceptional error handling)
This commit is contained in:
parent
2ad7ed10d6
commit
3ee086b257
2 changed files with 3 additions and 5 deletions
|
|
@ -319,6 +319,7 @@ pub enum ComIntSources {
|
||||||
Disconnect,
|
Disconnect,
|
||||||
Connect,
|
Connect,
|
||||||
WfxErr,
|
WfxErr,
|
||||||
|
IntErr,
|
||||||
Invalid,
|
Invalid,
|
||||||
}
|
}
|
||||||
impl From<u16> for ComIntSources {
|
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_DISCONNECT => ComIntSources::Disconnect,
|
||||||
com_rs_ref::INT_WLAN_CONNECT_EVENT => ComIntSources::Connect,
|
com_rs_ref::INT_WLAN_CONNECT_EVENT => ComIntSources::Connect,
|
||||||
com_rs_ref::INT_WLAN_WFX_ERR => ComIntSources::WfxErr,
|
com_rs_ref::INT_WLAN_WFX_ERR => ComIntSources::WfxErr,
|
||||||
|
com_rs_ref::INT_INVALID => ComIntSources::IntErr,
|
||||||
_ => ComIntSources::Invalid,
|
_ => ComIntSources::Invalid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -351,6 +353,7 @@ impl From<ComIntSources> for u16 {
|
||||||
ComIntSources::Connect => com_rs_ref::INT_WLAN_CONNECT_EVENT,
|
ComIntSources::Connect => com_rs_ref::INT_WLAN_CONNECT_EVENT,
|
||||||
ComIntSources::Disconnect => com_rs_ref::INT_WLAN_DISCONNECT,
|
ComIntSources::Disconnect => com_rs_ref::INT_WLAN_DISCONNECT,
|
||||||
ComIntSources::WfxErr => com_rs_ref::INT_WLAN_WFX_ERR,
|
ComIntSources::WfxErr => com_rs_ref::INT_WLAN_WFX_ERR,
|
||||||
|
ComIntSources::IntErr => com_rs_ref::INT_INVALID,
|
||||||
ComIntSources::Invalid => 0,
|
ComIntSources::Invalid => 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -642,11 +642,6 @@ impl Com {
|
||||||
rxlen = Some(maybe_rxlen as u16);
|
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;
|
mask_bit <<= 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue