MCPcopy Create free account
hub / github.com/RizeCrime/linuxblaster_control / read_ack

Function read_ack

src/features.rs:557–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557fn read_ack() {
558 for attempt in 0..MAX_READ_ATTEMPTS {
559 let Some(packet) = read_packet() else {
560 error!(
561 "Expected ACK but no response on attempt {}/{}",
562 attempt + 1,
563 MAX_READ_ATTEMPTS
564 );
565 continue;
566 };
567
568 if packet[0] == 0x5a && packet[1] == 0x02 {
569 debug!("ACK received: {:02x?}", &packet[..12]);
570 return;
571 }
572
573 debug!(
574 "Discarded non-ACK packet while waiting for ACK on attempt {}: {:02x?}",
575 attempt + 1,
576 &packet[..12]
577 );
578 }
579
580 error!("No ACK received after {} attempts", MAX_READ_ATTEMPTS);
581}
582
583// ─── DSP Getter/Setter (0x96 family via 0x11/0x12) ──────────────────────────
584

Callers 3

dsp_setFunction · 0.85
global_profile_setFunction · 0.85
output_setFunction · 0.85

Calls 1

read_packetFunction · 0.85

Tested by

no test coverage detected