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
use crate::generic::*; #[doc = "Bus priority acknowledge"] #[repr(transparent)] #[derive(Copy, Clone)] pub struct BusPriorityAck(pub u32); impl BusPriorityAck { #[doc = "Goes to 1 once all arbiters have registered the new global priority levels. Arbiters update their local priority when servicing a new nonsequential access. In normal circumstances this will happen almost immediately."] pub const fn bus_priority_ack(&self) -> bool { let val = (self.0 >> 0u32) & 0x01; val != 0 } #[doc = "Goes to 1 once all arbiters have registered the new global priority levels. Arbiters update their local priority when servicing a new nonsequential access. In normal circumstances this will happen almost immediately."] pub fn set_bus_priority_ack(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 0u32)) | (((val as u32) & 0x01) << 0u32); } } impl Default for BusPriorityAck { fn default() -> BusPriorityAck { BusPriorityAck(0) } } #[doc = "Bus fabric performance event select for PERFCTR1"] #[repr(transparent)] #[derive(Copy, Clone)] pub struct Perfsel(pub u32); impl Perfsel { #[doc = "Select a performance event for PERFCTR1"] pub const fn perfsel(&self) -> u8 { let val = (self.0 >> 0u32) & 0x1f; val as u8 } #[doc = "Select a performance event for PERFCTR1"] pub fn set_perfsel(&mut self, val: u8) { self.0 = (self.0 & !(0x1f << 0u32)) | (((val as u32) & 0x1f) << 0u32); } } impl Default for Perfsel { fn default() -> Perfsel { Perfsel(0) } } #[doc = "Bus fabric performance counter 1"] #[repr(transparent)] #[derive(Copy, Clone)] pub struct Perfctr(pub u32); impl Perfctr { #[doc = "Busfabric saturating performance counter 1 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL1"] pub const fn perfctr(&self) -> u32 { let val = (self.0 >> 0u32) & 0x00ff_ffff; val as u32 } #[doc = "Busfabric saturating performance counter 1 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL1"] pub fn set_perfctr(&mut self, val: u32) { self.0 = (self.0 & !(0x00ff_ffff << 0u32)) | (((val as u32) & 0x00ff_ffff) << 0u32); } } impl Default for Perfctr { fn default() -> Perfctr { Perfctr(0) } } #[doc = "Set the priority of each master for bus arbitration."] #[repr(transparent)] #[derive(Copy, Clone)] pub struct BusPriority(pub u32); impl BusPriority { #[doc = "0 - low priority, 1 - high priority"] pub const fn dma_w(&self) -> bool { let val = (self.0 >> 12u32) & 0x01; val != 0 } #[doc = "0 - low priority, 1 - high priority"] pub fn set_dma_w(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 12u32)) | (((val as u32) & 0x01) << 12u32); } #[doc = "0 - low priority, 1 - high priority"] pub const fn dma_r(&self) -> bool { let val = (self.0 >> 8u32) & 0x01; val != 0 } #[doc = "0 - low priority, 1 - high priority"] pub fn set_dma_r(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 8u32)) | (((val as u32) & 0x01) << 8u32); } #[doc = "0 - low priority, 1 - high priority"] pub const fn proc1(&self) -> bool { let val = (self.0 >> 4u32) & 0x01; val != 0 } #[doc = "0 - low priority, 1 - high priority"] pub fn set_proc1(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 4u32)) | (((val as u32) & 0x01) << 4u32); } #[doc = "0 - low priority, 1 - high priority"] pub const fn proc0(&self) -> bool { let val = (self.0 >> 0u32) & 0x01; val != 0 } #[doc = "0 - low priority, 1 - high priority"] pub fn set_proc0(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 0u32)) | (((val as u32) & 0x01) << 0u32); } } impl Default for BusPriority { fn default() -> BusPriority { BusPriority(0) } }