diff --git a/src/macros.rs b/src/macros.rs index 80d4681..b749592 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -173,7 +173,7 @@ macro_rules! zero_trailing_setter { #[doc = "This method panics if the given value is not"] #[doc = $expect] #[doc = "."] - $vis fn set(&mut $self_,value:$ty) -> &mut Self { + $vis fn $method(&mut $self_,value:$ty) -> &mut Self { use bit_field::BitField; assert!(value.trailing_zeros() >= $start, "The {} must be {}.", $name, $expect); diff --git a/src/ring/mod.rs b/src/ring/mod.rs index 581ef57..f16ad76 100644 --- a/src/ring/mod.rs +++ b/src/ring/mod.rs @@ -61,7 +61,6 @@ impl EventRingSegmentTableEntry { } } } - impl EventRingSegmentTableEntry { rw_double_zero_trailing!( pub, self, @@ -84,7 +83,6 @@ impl EventRingSegmentTableEntry { self.ring_segment_base_address() + (self.ring_segment_size() as u64) } } - impl Index for EventRingSegmentTableEntry { type Output = event::TRB; @@ -94,7 +92,6 @@ impl Index for EventRingSegmentTableEntry { &slice[index] } } - impl IndexMut for EventRingSegmentTableEntry { fn index_mut(&mut self, index: usize) -> &mut Self::Output { let slice = self.as_mut_slice(); diff --git a/src/ring/trb/transfer.rs b/src/ring/trb/transfer.rs index f81b293..e6bf364 100644 --- a/src/ring/trb/transfer.rs +++ b/src/ring/trb/transfer.rs @@ -101,6 +101,9 @@ allowed_trb!("Transfer TRB", { /// No Op Transfer TRB NoOp = 8, }); +impl TRB { + ro_bit!(pub, self, self.0[3]; 4, chain_bit, "Chain"); +} impl Normal { impl_data_buffer_pointer!();