Skip to content

Commit 47d7f77

Browse files
Leedan Johnsonsandeepmistry
Leedan Johnson
authored andcommitted
Moved ss pin toggling inside of spi transaction block.
1 parent 735e96d commit 47d7f77

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/LoRa.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -765,14 +765,12 @@ uint8_t LoRaClass::singleTransfer(uint8_t address, uint8_t value)
765765
{
766766
uint8_t response;
767767

768-
digitalWrite(_ss, LOW);
769-
770768
_spi->beginTransaction(_spiSettings);
769+
digitalWrite(_ss, LOW);
771770
_spi->transfer(address);
772771
response = _spi->transfer(value);
773-
_spi->endTransaction();
774-
775772
digitalWrite(_ss, HIGH);
773+
_spi->endTransaction();
776774

777775
return response;
778776
}

0 commit comments

Comments
 (0)