From 4086afa6911d99fad9744303801b767ccf02a6f7 Mon Sep 17 00:00:00 2001 From: jgromes <jan.gromes@gmail.com> Date: Sat, 14 Aug 2021 08:02:38 +0200 Subject: [PATCH] [CC1101] Added 0x17 as valid version number (#349) --- src/modules/CC1101/CC1101.cpp | 2 +- src/modules/CC1101/CC1101.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index 9fd00bce..638a5def 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -17,7 +17,7 @@ int16_t CC1101::begin(float freq, float br, float freqDev, float rxBw, int8_t po bool flagFound = false; while((i < 10) && !flagFound) { int16_t version = getChipVersion(); - if((version == CC1101_VERSION_CURRENT) || (version == CC1101_VERSION_LEGACY)) { + if((version == CC1101_VERSION_CURRENT) || (version == CC1101_VERSION_LEGACY) || (version == CC1101_VERSION_CLONE)) { flagFound = true; } else { #ifdef RADIOLIB_DEBUG diff --git a/src/modules/CC1101/CC1101.h b/src/modules/CC1101/CC1101.h index c8452109..95e8f455 100644 --- a/src/modules/CC1101/CC1101.h +++ b/src/modules/CC1101/CC1101.h @@ -458,6 +458,7 @@ // CC1101_REG_VERSION #define CC1101_VERSION_CURRENT 0x14 #define CC1101_VERSION_LEGACY 0x04 +#define CC1101_VERSION_CLONE 0x17 // CC1101_REG_MARCSTATE #define CC1101_MARC_STATE_SLEEP 0x00 // 4 0 main radio control state: sleep