1#![allow(dead_code)]
3use crate::{
4 device::{self, CardBusDetails, PciBridgeDetails, StandardDetails},
5 register,
6};
7use volatile::Volatile;
8
9pub struct MemoryMappedDevice<'device> {
10 header: Volatile<&'device mut device::Header>,
11 details: MmKind<'device>,
12}
13
14enum MmKind<'device> {
15 Standard(Volatile<&'device mut StandardDetails>),
16 CardBusBridge(Volatile<&'device mut CardBusDetails>),
17 PciBridge(Volatile<&'device mut PciBridgeDetails>),
18}
19
20impl MemoryMappedDevice<'_> {
21 pub fn header(&self) -> device::Header {
22 self.header.read()
23 }
24
25 pub fn send_command(&mut self, command: register::Command) {
26 let _ = command;
28 todo!()
29 }
30}
31
32#[cfg(test)]
33mod tests {
34 }