1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub struct ArmCpu {
    processor: Processor,
}

pub enum Processor {
    /// RISC ARM processor that implements the ARMv5TE architecture.
    Arm9,
    /// RISC ARM processor that implements the ARMv6K architecture.
    Arm11,
}

impl Default for ArmCpu {
    /// Creates a new [`ArmCpu`] with a [`Processor::Arm9`] processor.
    fn default() -> Self {
        Self { processor: Processor::Arm9 }
    }
}

impl ArmCpu {
    /// Creates a new [`ArmCpu`] with the given [`Processor`].
    fn new(processor: Processor) -> Self {
        Self { processor }
    }
}