feat(writer): reduce byte transactions (from N to len of buffer)

This commit is contained in:
doryan 2025-05-23 17:31:20 +04:00
parent f43340db30
commit f069c3b4b2

View File

@ -110,7 +110,10 @@ where
}
fn write_bytes(&self, transmit_data: &mut RingBuffer<N>) {
<Self as SoftSerialWriter<P, &mut RingBuffer<N>>>::write_byte(self, N as u8);
<Self as SoftSerialWriter<P, &mut RingBuffer<N>>>::write_byte(
self,
transmit_data.len() as u8,
);
for _ in 0..N {
let byte = transmit_data.pop().unwrap_or(0);