From 6c1137177f92f9a5c5cd9c2a0450b5db5165f8be Mon Sep 17 00:00:00 2001 From: kalkyl Date: Sat, 13 May 2023 06:34:03 +0200 Subject: Wait until there's enough space in tx buffer, remove busy wait for completed send --- src/socket.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/socket.rs') diff --git a/src/socket.rs b/src/socket.rs index 0d3d1aeb2..3f64d04d1 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -22,7 +22,6 @@ pub enum Command { pub const INTR: u16 = 0x02; #[repr(u8)] pub enum Interrupt { - SendOk = 0b010000_u8, Receive = 0b00100_u8, } @@ -34,16 +33,6 @@ pub async fn reset_interrupt( bus.write_frame(RegisterBlock::Socket0, INTR, &data).await } -pub async fn is_interrupt( - bus: &mut SpiInterface, - code: Interrupt, -) -> Result { - let mut data = [0u8]; - bus.read_frame(RegisterBlock::Socket0, INTR, &mut data) - .await?; - Ok(data[0] & code as u8 != 0) -} - pub async fn get_tx_write_ptr( bus: &mut SpiInterface, ) -> Result { -- cgit