From 60a093775a93894e36cec36afc843663ceaec76b Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 29 Dec 2024 10:03:13 +0100 Subject: [PATCH] [CC1101] Use Module SPI transfer stream --- src/modules/CC1101/CC1101.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index 2d5f27ec..b91b949f 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -1160,21 +1160,7 @@ void CC1101::SPIwriteRegisterBurst(uint8_t reg, uint8_t* data, size_t len) { } void CC1101::SPIsendCommand(uint8_t cmd) { - // pull NSS low - this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelLow); - - // start transfer - this->mod->hal->spiBeginTransaction(); - - // send the command byte - uint8_t status = 0; - this->mod->hal->spiTransfer(&cmd, 1, &status); - - // stop transfer - this->mod->hal->spiEndTransaction(); - this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelHigh); - RADIOLIB_DEBUG_SPI_PRINTLN("CMD\tW\t%02X\t%02X", cmd, status); - (void)status; + this->mod->SPItransferStream(&cmd, 1, true, NULL, NULL, 0, false); } #endif