Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/lmic/radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ int radio_init () {
// some sanity checks, e.g., read version number
u1_t v = readReg(RegVersion);
#ifdef CFG_sx1276_radio
if(v != 0x12 )
if(v != 0x12 & v != 0x13)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(v != 0x12 & v != 0x13):

This should be &&, not &. Or else if ((v & ~1u) == 0x12), which might be smaller on AVR. Ideally, this would be a macro or inline check: if (is_sx1276_like(v)), where is_sx1276_like() looks at v and makes the decision.

We've not heard more on this since the last few years; has Semtech documented this? Or is this not relevant after all?

return 0;
#elif CFG_sx1272_radio
if(v != 0x22)
Expand Down