summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucoo/hal/spi/spi_soft.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ucoo/hal/spi/spi_soft.cc b/ucoo/hal/spi/spi_soft.cc
index 3bcc0d5..93409a2 100644
--- a/ucoo/hal/spi/spi_soft.cc
+++ b/ucoo/hal/spi/spi_soft.cc
@@ -85,9 +85,9 @@ SpiSoftMaster::send_and_recv (char tx)
mosi_.set (tx & i);
delay_ns (half_period_ns_);
// Sample stage.
- sck_.toggle ();
if (miso_.get ())
rx |= i;
+ sck_.toggle ();
delay_ns (half_period_ns_);
// SCK toggle for next setup stage.
if (!cpha_)