Skip to content

Commit a0146fc

Browse files
authored
Merge pull request #20 from rpocklin/fix-esp32-spi-transactions
fix: SPI transactions on esp32
2 parents c27106f + 0248c6c commit a0146fc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/vl53l8cx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class VL53L8CX {
179179
*(p_values + i + position) = dev_spi->transfer(0x00);
180180
}
181181
digitalWrite(cs_pin, HIGH);
182+
dev_spi->endTransaction();
182183
}
183184
return 0;
184185
}
@@ -248,6 +249,7 @@ class VL53L8CX {
248249
digitalWrite(cs_pin, LOW);
249250
dev_spi->transfer(&data_write, data_size);
250251
digitalWrite(cs_pin, HIGH);
252+
dev_spi->endTransaction();
251253
}
252254
return status;
253255
}

0 commit comments

Comments
 (0)