diff options
Diffstat (limited to 'src/socket.rs')
| -rw-r--r-- | src/socket.rs | 11 |
1 files changed, 0 insertions, 11 deletions
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 { | |||
| 22 | pub const INTR: u16 = 0x02; | 22 | pub const INTR: u16 = 0x02; |
| 23 | #[repr(u8)] | 23 | #[repr(u8)] |
| 24 | pub enum Interrupt { | 24 | pub enum Interrupt { |
| 25 | SendOk = 0b010000_u8, | ||
| 26 | Receive = 0b00100_u8, | 25 | Receive = 0b00100_u8, |
| 27 | } | 26 | } |
| 28 | 27 | ||
| @@ -34,16 +33,6 @@ pub async fn reset_interrupt<SPI: SpiDevice>( | |||
| 34 | bus.write_frame(RegisterBlock::Socket0, INTR, &data).await | 33 | bus.write_frame(RegisterBlock::Socket0, INTR, &data).await |
| 35 | } | 34 | } |
| 36 | 35 | ||
| 37 | pub async fn is_interrupt<SPI: SpiDevice>( | ||
| 38 | bus: &mut SpiInterface<SPI>, | ||
| 39 | code: Interrupt, | ||
| 40 | ) -> Result<bool, SPI::Error> { | ||
| 41 | let mut data = [0u8]; | ||
| 42 | bus.read_frame(RegisterBlock::Socket0, INTR, &mut data) | ||
| 43 | .await?; | ||
| 44 | Ok(data[0] & code as u8 != 0) | ||
| 45 | } | ||
| 46 | |||
| 47 | pub async fn get_tx_write_ptr<SPI: SpiDevice>( | 36 | pub async fn get_tx_write_ptr<SPI: SpiDevice>( |
| 48 | bus: &mut SpiInterface<SPI>, | 37 | bus: &mut SpiInterface<SPI>, |
| 49 | ) -> Result<u16, SPI::Error> { | 38 | ) -> Result<u16, SPI::Error> { |
