From 5dfaf00302124c95b928a44624d7e32712e60c79 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 7 Apr 2024 15:47:39 +0100 Subject: [PATCH] [nRF24] Rework SPI config interface --- src/modules/nRF24/nRF24.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/nRF24/nRF24.cpp b/src/modules/nRF24/nRF24.cpp index 40678b8c..0e9d45c1 100644 --- a/src/modules/nRF24/nRF24.cpp +++ b/src/modules/nRF24/nRF24.cpp @@ -8,8 +8,8 @@ nRF24::nRF24(Module* mod) : PhysicalLayer(RADIOLIB_NRF24_FREQUENCY_STEP_SIZE, RA int16_t nRF24::begin(int16_t freq, int16_t dr, int8_t pwr, uint8_t addrWidth) { // set module properties - this->mod->SPIreadCommand = RADIOLIB_NRF24_CMD_READ; - this->mod->SPIwriteCommand = RADIOLIB_NRF24_CMD_WRITE; + this->mod->spiConfig.cmds[RADIOLIB_MODULE_SPI_COMMAND_READ] = RADIOLIB_NRF24_CMD_READ; + this->mod->spiConfig.cmds[RADIOLIB_MODULE_SPI_COMMAND_WRITE] = RADIOLIB_NRF24_CMD_WRITE; this->mod->init(); this->mod->hal->pinMode(this->mod->getIrq(), this->mod->hal->GpioModeInput);