1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved_0_host: [u8; 266usize], } impl RegisterBlock { #[doc = "0x00 - USB is Host"] #[inline(always)] pub fn host(&self) -> &HOST { unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const HOST) } } #[doc = "0x00 - USB is Host"] #[inline(always)] pub fn host_mut(&self) -> &mut HOST { unsafe { &mut *(((self as *const Self) as *mut u8).add(0usize) as *mut HOST) } } #[doc = "0x00 - USB is Device"] #[inline(always)] pub fn device(&self) -> &DEVICE { unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const DEVICE) } } #[doc = "0x00 - USB is Device"] #[inline(always)] pub fn device_mut(&self) -> &mut DEVICE { unsafe { &mut *(((self as *const Self) as *mut u8).add(0usize) as *mut DEVICE) } } } #[doc = r"Register block"] #[repr(C)] pub struct DEVICE { #[doc = "0x00 - Control A"] pub ctrla: self::device::CTRLA, _reserved1: [u8; 1usize], #[doc = "0x02 - Synchronization Busy"] pub syncbusy: self::device::SYNCBUSY, #[doc = "0x03 - USB Quality Of Service"] pub qosctrl: self::device::QOSCTRL, _reserved3: [u8; 4usize], #[doc = "0x08 - DEVICE Control B"] pub ctrlb: self::device::CTRLB, #[doc = "0x0a - DEVICE Device Address"] pub dadd: self::device::DADD, _reserved5: [u8; 1usize], #[doc = "0x0c - DEVICE Status"] pub status: self::device::STATUS, #[doc = "0x0d - Finite State Machine Status"] pub fsmstatus: self::device::FSMSTATUS, _reserved7: [u8; 2usize], #[doc = "0x10 - DEVICE Device Frame Number"] pub fnum: self::device::FNUM, _reserved8: [u8; 2usize], #[doc = "0x14 - DEVICE Device Interrupt Enable Clear"] pub intenclr: self::device::INTENCLR, _reserved9: [u8; 2usize], #[doc = "0x18 - DEVICE Device Interrupt Enable Set"] pub intenset: self::device::INTENSET, _reserved10: [u8; 2usize], #[doc = "0x1c - DEVICE Device Interrupt Flag"] pub intflag: self::device::INTFLAG, _reserved11: [u8; 2usize], #[doc = "0x20 - DEVICE End Point Interrupt Summary"] pub epintsmry: self::device::EPINTSMRY, _reserved12: [u8; 2usize], #[doc = "0x24 - Descriptor Address"] pub descadd: self::device::DESCADD, #[doc = "0x28 - USB PAD Calibration"] pub padcal: self::device::PADCAL, _reserved14: [u8; 214usize], #[doc = "0x100 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint0: self::device::DEVICE_ENDPOINT, _reserved15: [u8; 22usize], #[doc = "0x120 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint1: self::device::DEVICE_ENDPOINT, _reserved16: [u8; 22usize], #[doc = "0x140 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint2: self::device::DEVICE_ENDPOINT, _reserved17: [u8; 22usize], #[doc = "0x160 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint3: self::device::DEVICE_ENDPOINT, _reserved18: [u8; 22usize], #[doc = "0x180 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint4: self::device::DEVICE_ENDPOINT, _reserved19: [u8; 22usize], #[doc = "0x1a0 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint5: self::device::DEVICE_ENDPOINT, _reserved20: [u8; 22usize], #[doc = "0x1c0 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint6: self::device::DEVICE_ENDPOINT, _reserved21: [u8; 22usize], #[doc = "0x1e0 - DEVICE_ENDPOINT\\[%s\\]"] pub device_endpoint7: self::device::DEVICE_ENDPOINT, } #[doc = r"Register block"] #[doc = "USB is Device"] pub mod device; #[doc = r"Register block"] #[repr(C)] pub struct HOST { #[doc = "0x00 - Control A"] pub ctrla: self::host::CTRLA, _reserved1: [u8; 1usize], #[doc = "0x02 - Synchronization Busy"] pub syncbusy: self::host::SYNCBUSY, #[doc = "0x03 - USB Quality Of Service"] pub qosctrl: self::host::QOSCTRL, _reserved3: [u8; 4usize], #[doc = "0x08 - HOST Control B"] pub ctrlb: self::host::CTRLB, #[doc = "0x0a - HOST Host Start Of Frame Control"] pub hsofc: self::host::HSOFC, _reserved5: [u8; 1usize], #[doc = "0x0c - HOST Status"] pub status: self::host::STATUS, #[doc = "0x0d - Finite State Machine Status"] pub fsmstatus: self::host::FSMSTATUS, _reserved7: [u8; 2usize], #[doc = "0x10 - HOST Host Frame Number"] pub fnum: self::host::FNUM, #[doc = "0x12 - HOST Host Frame Length"] pub flenhigh: self::host::FLENHIGH, _reserved9: [u8; 1usize], #[doc = "0x14 - HOST Host Interrupt Enable Clear"] pub intenclr: self::host::INTENCLR, _reserved10: [u8; 2usize], #[doc = "0x18 - HOST Host Interrupt Enable Set"] pub intenset: self::host::INTENSET, _reserved11: [u8; 2usize], #[doc = "0x1c - HOST Host Interrupt Flag"] pub intflag: self::host::INTFLAG, _reserved12: [u8; 2usize], #[doc = "0x20 - HOST Pipe Interrupt Summary"] pub pintsmry: self::host::PINTSMRY, _reserved13: [u8; 2usize], #[doc = "0x24 - Descriptor Address"] pub descadd: self::host::DESCADD, #[doc = "0x28 - USB PAD Calibration"] pub padcal: self::host::PADCAL, _reserved15: [u8; 214usize], #[doc = "0x100 - HOST_PIPE\\[%s\\]"] pub host_pipe0: self::host::HOST_PIPE, _reserved16: [u8; 22usize], #[doc = "0x120 - HOST_PIPE\\[%s\\]"] pub host_pipe1: self::host::HOST_PIPE, _reserved17: [u8; 22usize], #[doc = "0x140 - HOST_PIPE\\[%s\\]"] pub host_pipe2: self::host::HOST_PIPE, _reserved18: [u8; 22usize], #[doc = "0x160 - HOST_PIPE\\[%s\\]"] pub host_pipe3: self::host::HOST_PIPE, _reserved19: [u8; 22usize], #[doc = "0x180 - HOST_PIPE\\[%s\\]"] pub host_pipe4: self::host::HOST_PIPE, _reserved20: [u8; 22usize], #[doc = "0x1a0 - HOST_PIPE\\[%s\\]"] pub host_pipe5: self::host::HOST_PIPE, _reserved21: [u8; 22usize], #[doc = "0x1c0 - HOST_PIPE\\[%s\\]"] pub host_pipe6: self::host::HOST_PIPE, _reserved22: [u8; 22usize], #[doc = "0x1e0 - HOST_PIPE\\[%s\\]"] pub host_pipe7: self::host::HOST_PIPE, } #[doc = r"Register block"] #[doc = "USB is Host"] pub mod host;