mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
add some debug output on asserts
This commit is contained in:
parent
7021116a37
commit
b13671b3bb
1 changed files with 2 additions and 2 deletions
|
|
@ -241,8 +241,8 @@ impl SpinalUdcDescriptor {
|
|||
}
|
||||
fn write(&self, offset: usize, data: u32) {
|
||||
// -16 for the dedicated ep0-out space
|
||||
assert!((self.base.load(Ordering::SeqCst) as u32) & 0xFFF >= crate::START_OFFSET - 16, "descriptor is illegal (too low)!");
|
||||
assert!((self.base.load(Ordering::SeqCst) as u32) & 0xFFF < crate::END_OFFSET, "descriptor is illegal (too high)!");
|
||||
assert!((self.base.load(Ordering::SeqCst) as u32) & 0xFFF >= crate::START_OFFSET - 16, "descriptor is illegal (too low)! 0x{:x}", self.base.load(Ordering::SeqCst) as u32);
|
||||
assert!((self.base.load(Ordering::SeqCst) as u32) & 0xFFF < crate::END_OFFSET, "descriptor is illegal (too high)! 0x{:x}", self.base.load(Ordering::SeqCst) as u32);
|
||||
unsafe{self.base.load(Ordering::SeqCst).add(offset).write_volatile(data)}
|
||||
}
|
||||
pub fn offset(&self) -> usize {
|
||||
|
|
|
|||
Loading…
Reference in a new issue