[CC1101] Rework SPI config interface

This commit is contained in:
jgromes 2024-04-07 15:46:48 +01:00
parent 978ebf2e3d
commit 8b9c26cd88

View file

@ -8,8 +8,8 @@ CC1101::CC1101(Module* module) : PhysicalLayer(RADIOLIB_CC1101_FREQUENCY_STEP_SI
int16_t CC1101::begin(float freq, float br, float freqDev, float rxBw, int8_t pwr, uint8_t preambleLength) {
// set module properties
this->mod->SPIreadCommand = RADIOLIB_CC1101_CMD_READ;
this->mod->SPIwriteCommand = RADIOLIB_CC1101_CMD_WRITE;
this->mod->spiConfig.cmds[RADIOLIB_MODULE_SPI_COMMAND_READ] = RADIOLIB_CC1101_CMD_READ;
this->mod->spiConfig.cmds[RADIOLIB_MODULE_SPI_COMMAND_WRITE] = RADIOLIB_CC1101_CMD_WRITE;
this->mod->init();
this->mod->hal->pinMode(this->mod->getIrq(), this->mod->hal->GpioModeInput);