From 6a1f6a421b89a3221646406b2e4446abaacb35bc Mon Sep 17 00:00:00 2001
From: jonathan <jonathantbrouwer@gmail.com>
Date: Fri, 10 Mar 2023 23:02:22 +0100
Subject: [PATCH] Remove pin 8

---
 src/twi.rs | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/twi.rs b/src/twi.rs
index 5dcb05c..56502fb 100644
--- a/src/twi.rs
+++ b/src/twi.rs
@@ -126,10 +126,8 @@ impl embedded_hal::blocking::i2c::WriteRead for TwiWrapper {
             // If we want to read multiple bytes we need to use the suspend mode.
             if !before.is_empty() {
                 self.twi.shorts.write(|w| w.bb_suspend().enabled());
-                let _ = unsafe { nrf51_hal::gpio::p0::Parts::new(nrf51_pac::Peripherals::steal().GPIO).p0_08.into_push_pull_output(Level::Low) };
             } else {
                 self.twi.shorts.write(|w| w.bb_stop().enabled());
-                let _ = unsafe { nrf51_hal::gpio::p0::Parts::new(nrf51_pac::Peripherals::steal().GPIO).p0_08.into_push_pull_output(Level::High) };
             }
 
             // Start data reception.
@@ -141,13 +139,11 @@ impl embedded_hal::blocking::i2c::WriteRead for TwiWrapper {
             }
 
             self.twi.shorts.write(|w| w.bb_stop().enabled());
-            let _ = unsafe { nrf51_hal::gpio::p0::Parts::new(nrf51_pac::Peripherals::steal().GPIO).p0_08.into_push_pull_output(Level::High) };
             self.twi.tasks_resume.write(|w| unsafe { w.bits(1) });
             *last = self.recv_byte()?;
         } else {
             self.send_stop()?;
         }
-        let _ = unsafe { nrf51_hal::gpio::p0::Parts::new(nrf51_pac::Peripherals::steal().GPIO).p0_08.into_push_pull_output(Level::Low) };
         Ok(())
     }
 }
-- 
GitLab