Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add chip revision number for Semtech SX123xH #1397

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/modules/SX123x/SX1231.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ int16_t SX1231::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 == RADIOLIB_SX123X_CHIP_REVISION_2_A) || (version == RADIOLIB_SX123X_CHIP_REVISION_2_B) || (version == RADIOLIB_SX123X_CHIP_REVISION_2_C)) {
if((version == RADIOLIB_SX123X_CHIP_REVISION_2_A) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_B) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_C) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_D)) {
flagFound = true;
this->chipRevision = version;
} else {
Expand Down
1 change: 1 addition & 0 deletions src/modules/SX123x/SX1231.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define RADIOLIB_SX123X_CHIP_REVISION_2_A 0x21
#define RADIOLIB_SX123X_CHIP_REVISION_2_B 0x22
#define RADIOLIB_SX123X_CHIP_REVISION_2_C 0x23
#define RADIOLIB_SX123X_CHIP_REVISION_2_D 0x24

// RADIOLIB_SX1231 specific register map
#define RADIOLIB_SX1231_REG_TEST_OOK 0x6E
Expand Down
5 changes: 4 additions & 1 deletion src/modules/SX123x/SX1233.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ int16_t SX1233::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 == RADIOLIB_SX123X_CHIP_REVISION_2_A) || (version == RADIOLIB_SX123X_CHIP_REVISION_2_B) || (version == RADIOLIB_SX123X_CHIP_REVISION_2_C)) {
if((version == RADIOLIB_SX123X_CHIP_REVISION_2_A) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_B) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_C) ||
(version == RADIOLIB_SX123X_CHIP_REVISION_2_D)) {
flagFound = true;
this->chipRevision = version;
} else {
Expand Down
Loading