diff --git a/src/structures/ring_buffer.rs b/src/structures/ring_buffer.rs index f5681f6..4483fe8 100644 --- a/src/structures/ring_buffer.rs +++ b/src/structures/ring_buffer.rs @@ -109,14 +109,14 @@ where crate::_priv_write_bytes::

(data); } + #[inline(never)] fn write_bytes(&self, transmit_data: &mut RingBuffer) { >>::write_byte( self, transmit_data.len() as u8, ); - for _ in 0..N { - let byte = transmit_data.pop().unwrap_or(0); + for byte in transmit_data { self.sync_transmitter(); >>::write_byte(self, byte); } @@ -132,6 +132,7 @@ where crate::_priv_read_byte::

() } + #[inline(never)] fn read_bytes(&self, recieve_data: &mut RingBuffer) { let byte = >>::read_byte(self);