armagnac 0.3.0

A simple ARM emulation library for simulating embedded systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait Align {
    fn align(&self, n: usize) -> Self;
    fn is_aligned(&self, n: usize) -> bool;
}

impl Align for u32 {
    fn align(&self, n: usize) -> Self {
        self - (self % (n as u32))
    }

    fn is_aligned(&self, n: usize) -> bool {
        *self == self.align(n)
    }
}