From 0210e10a249f6bb085dfbb5921c4bd9140ab0f4b Mon Sep 17 00:00:00 2001 From: jgromes Date: Thu, 30 Mar 2023 23:17:34 +0200 Subject: [PATCH] [MOD] Fixed swapped NSS/BUSY order (#716) --- src/Module.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Module.cpp b/src/Module.cpp index 7df4d0db..d715b13d 100644 --- a/src/Module.cpp +++ b/src/Module.cpp @@ -336,9 +336,6 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint uint8_t debugBuff[RADIOLIB_STATIC_ARRAY_SIZE]; #endif - // pull NSS low - this->digitalWrite(this->getCs(), LOW); - // ensure GPIO is low uint32_t start = this->millis(); while(this->digitalRead(this->getGpio())) { @@ -349,6 +346,9 @@ int16_t Module::SPItransferStream(uint8_t* cmd, uint8_t cmdLen, bool write, uint } } + // pull NSS low + this->digitalWrite(this->getCs(), LOW); + // start transfer this->SPIbeginTransaction();