Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
XdoctorwhoZ committed Jul 20, 2024
1 parent d380e2b commit 73cd6ff
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,21 @@ fn main() -> ! {

// });

cmd_buf[..count].clone_from_slice(&buf);
cmd_buf_size += count;
// cmd_buf[cmd_buf_size..count].clone_from_slice(&buf);

for i in 0..cmd_buf_size {
let _ = pin.set_high();
// delay.delay_ms(500);
// let _ = pin.set_low();
{
let (left, right) = cmd_buf.split_at_mut(cmd_buf_size);
right.clone_from_slice(&buf[..count]);
cmd_buf_size += count;
}

// cmd_buf_size += count;

for i in 0..count {
pin.set_high().unwrap();
delay.delay_ms(250);
pin.set_low().unwrap();
delay.delay_ms(250);
}

// // Convert to upper case
Expand Down

0 comments on commit 73cd6ff

Please sign in to comment.