aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-09-27 14:39:39 +0200
committerRon Evans <[email protected]>2020-09-27 15:21:54 +0200
commitd39c7abb4d618b817e8ae0bd77eb54c7ba3a61bb (patch)
treee9708755ae648314bf58bb26ef79e6c88b4bffe6
parent9e61e6fe4d91a82dcb4d56b2226eb4d4a84f6e2f (diff)
downloadtinygo-d39c7abb4d618b817e8ae0bd77eb54c7ba3a61bb.tar.gz
tinygo-d39c7abb4d618b817e8ae0bd77eb54c7ba3a61bb.zip
nrf: fix double stop signal in I2C
-rw-r--r--src/machine/machine_nrf.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/machine/machine_nrf.go b/src/machine/machine_nrf.go
index 506f134e2..39743bf5f 100644
--- a/src/machine/machine_nrf.go
+++ b/src/machine/machine_nrf.go
@@ -260,10 +260,6 @@ func (i2c I2C) Configure(config I2CConfig) {
// bytes and stores them in r, and generates a stop condition on the bus.
func (i2c I2C) Tx(addr uint16, w, r []byte) (err error) {
i2c.Bus.ADDRESS.Set(uint32(addr))
- defer func() {
- i2c.signalStop()
- i2c.Bus.SHORTS.Set(nrf.TWI_SHORTS_BB_SUSPEND_Disabled)
- }()
if len(w) != 0 {
i2c.Bus.TASKS_STARTTX.Set(1) // start transmission for writing