atsamd21g/
usb.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    _reserved_0_host: [u8; 0x0109],
5}
6impl RegisterBlock {
7    #[doc = "0x00..0x109 - USB is Host"]
8    #[inline(always)]
9    pub const fn host(&self) -> &Host {
10        unsafe { &*(self as *const Self).cast::<u8>().add(0).cast() }
11    }
12    #[doc = "0x00..0x109 - USB is Device"]
13    #[inline(always)]
14    pub const fn device(&self) -> &Device {
15        unsafe { &*(self as *const Self).cast::<u8>().add(0).cast() }
16    }
17}
18#[doc = "USB is Device"]
19pub use self::device::Device;
20#[doc = r"Cluster"]
21#[doc = "USB is Device"]
22pub mod device;
23#[doc = "USB is Host"]
24pub use self::host::Host;
25#[doc = r"Cluster"]
26#[doc = "USB is Host"]
27pub mod host;