[CC1101] Added 0x04 as valid version register value (#183)
This commit is contained in:
parent
35f02ed402
commit
cd142df4b9
2 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
uint8_t version = SPIreadRegister(CC1101_REG_VERSION);
|
||||
if(version == 0x14) {
|
||||
if((version == CC1101_VERSION_CURRENT) || (version == CC1101_VERSION_LEGACY)) {
|
||||
flagFound = true;
|
||||
} else {
|
||||
#ifdef RADIOLIB_DEBUG
|
||||
|
|
|
@ -455,7 +455,8 @@
|
|||
#define CC1101_PARTNUM 0x00
|
||||
|
||||
// CC1101_REG_VERSION
|
||||
#define CC1101_VERSION 0x14
|
||||
#define CC1101_VERSION_CURRENT 0x14
|
||||
#define CC1101_VERSION_LEGACY 0x04
|
||||
|
||||
// CC1101_REG_MARCSTATE
|
||||
#define CC1101_MARC_STATE_SLEEP 0x00 // 4 0 main radio control state: sleep
|
||||
|
|
Loading…
Add table
Reference in a new issue