From 8f5440e4b5ca52e0d506817db7ecb46fc3f5be97 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 19 May 2024 13:55:53 +0200 Subject: [PATCH] [LR11x0] Clarified device macro naming --- src/modules/LR11x0/LR1110.cpp | 2 +- src/modules/LR11x0/LR1120.cpp | 2 +- src/modules/LR11x0/LR1121.cpp | 2 +- src/modules/LR11x0/LR11x0.h | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/LR11x0/LR1110.cpp b/src/modules/LR11x0/LR1110.cpp index 39f00527..77e1a02f 100644 --- a/src/modules/LR11x0/LR1110.cpp +++ b/src/modules/LR11x0/LR1110.cpp @@ -2,7 +2,7 @@ #if !RADIOLIB_EXCLUDE_LR11X0 LR1110::LR1110(Module* mod) : LR11x0(mod) { - chipType = RADIOLIB_LR11X0_HW_LR1110; + chipType = RADIOLIB_LR11X0_DEVICE_LR1110; } int16_t LR1110::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint16_t preambleLength, float tcxoVoltage) { diff --git a/src/modules/LR11x0/LR1120.cpp b/src/modules/LR11x0/LR1120.cpp index b3c0c88e..a1107036 100644 --- a/src/modules/LR11x0/LR1120.cpp +++ b/src/modules/LR11x0/LR1120.cpp @@ -2,7 +2,7 @@ #if !RADIOLIB_EXCLUDE_LR11X0 LR1120::LR1120(Module* mod) : LR11x0(mod) { - chipType = RADIOLIB_LR11X0_HW_LR1120; + chipType = RADIOLIB_LR11X0_DEVICE_LR1120; } int16_t LR1120::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint16_t preambleLength, float tcxoVoltage) { diff --git a/src/modules/LR11x0/LR1121.cpp b/src/modules/LR11x0/LR1121.cpp index 14e72920..6292a3be 100644 --- a/src/modules/LR11x0/LR1121.cpp +++ b/src/modules/LR11x0/LR1121.cpp @@ -2,7 +2,7 @@ #if !RADIOLIB_EXCLUDE_LR11X0 LR1121::LR1121(Module* mod) : LR1120(mod) { - chipType = RADIOLIB_LR11X0_HW_LR1121; + chipType = RADIOLIB_LR11X0_DEVICE_LR1121; } #endif \ No newline at end of file diff --git a/src/modules/LR11x0/LR11x0.h b/src/modules/LR11x0/LR11x0.h index efe4a749..3e3df571 100644 --- a/src/modules/LR11x0/LR11x0.h +++ b/src/modules/LR11x0/LR11x0.h @@ -200,10 +200,10 @@ #define RADIOLIB_LR11X0_SPI_MAX_READ_WRITE_LEN (256) // 7 0 maximum length of read/write SPI payload in bytes // RADIOLIB_LR11X0_CMD_GET_VERSION -#define RADIOLIB_LR11X0_HW_LR1110 (0x01UL << 0) // 7 0 HW version: LR1110 -#define RADIOLIB_LR11X0_HW_LR1120 (0x02UL << 0) // 7 0 LR1120 -#define RADIOLIB_LR11X0_HW_LR1121 (0x03UL << 0) // 7 0 LR1121 -#define RADIOLIB_LR11X0_HW_BOOT (0xDFUL << 0) // 7 0 bootloader mode +#define RADIOLIB_LR11X0_DEVICE_LR1110 (0x01UL << 0) // 7 0 HW device: LR1110 +#define RADIOLIB_LR11X0_DEVICE_LR1120 (0x02UL << 0) // 7 0 LR1120 +#define RADIOLIB_LR11X0_DEVICE_LR1121 (0x03UL << 0) // 7 0 LR1121 +#define RADIOLIB_LR11X0_DEVICE_BOOT (0xDFUL << 0) // 7 0 bootloader mode // RADIOLIB_LR11X0_CMD_GET_ERRORS #define RADIOLIB_LR11X0_ERROR_STAT_LF_RC_CALIB_ERR (0x01UL << 0) // 15 0 error: low frequency RC not calibrated