add fix discovered during sim testing

This commit is contained in:
bunnie 2025-01-02 01:02:08 +08:00
parent 6d3c50144e
commit e66303e044

View file

@ -148,6 +148,9 @@ impl Mbox {
}
pub fn try_send(&mut self, to_cm7: MboxToCm7Pkt) -> Result<(), MboxError> {
// clear any pending bits from previous transactions
self.csr.wo(mailbox::EV_PENDING, self.csr.r(mailbox::EV_PENDING));
if to_cm7.data.len() > MAX_PKT_LEN {
Err(MboxError::TxOverflow)
} else {