Skip to content

Commit e6dcb46

Browse files
committed
[LR11x0] Remove setSyncBits method
1 parent e6de3e2 commit e6dcb46

3 files changed

Lines changed: 0 additions & 37 deletions

File tree

examples/LR11x0/LR11x0_GFSK_Modem/LR11x0_GFSK_Modem.ino

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ void setup() {
7070
while (true) { delay(10); }
7171
}
7272

73-
// GFSK modem on LR11x0 can handle the sync word setting in bits, not just
74-
// whole bytes. The value used is left-justified.
75-
// This makes same result as radio.setSyncWord(syncWord, 8):
76-
state = radio.setSyncBits(syncWord, 64);
77-
// This will use 0x012 as sync word (12 bits only):
78-
state = radio.setSyncBits(syncWord, 12);
79-
8073
// GFSK modem allows advanced CRC configuration
8174
// Default is CCIT CRC16 (2 bytes, initial 0x1D0F, polynomial 0x1021, inverted)
8275
// Set CRC to IBM CRC (2 bytes, initial 0xFFFF, polynomial 0x8005, non-inverted)

src/modules/LR11x0/LR11x0.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -835,27 +835,6 @@ int16_t LR11x0::setSyncWord(uint8_t* syncWord, size_t len) {
835835
return(RADIOLIB_ERR_WRONG_MODEM);
836836
}
837837

838-
int16_t LR11x0::setSyncBits(uint8_t *syncWord, uint8_t bitsLen) {
839-
if((!syncWord) || (!bitsLen) || (bitsLen > 8*RADIOLIB_LR11X0_GFSK_SYNC_WORD_LEN)) {
840-
return(RADIOLIB_ERR_INVALID_SYNC_WORD);
841-
}
842-
843-
// check active modem
844-
uint8_t type = RADIOLIB_LR11X0_PACKET_TYPE_NONE;
845-
int16_t state = getPacketType(&type);
846-
RADIOLIB_ASSERT(state);
847-
if(type != RADIOLIB_LR11X0_PACKET_TYPE_GFSK) {
848-
return(RADIOLIB_ERR_WRONG_MODEM);
849-
}
850-
851-
uint8_t bytesLen = bitsLen / 8;
852-
if ((bitsLen % 8) != 0) {
853-
bytesLen++;
854-
}
855-
856-
return(setSyncWord(syncWord, bytesLen));
857-
}
858-
859838
int16_t LR11x0::setNodeAddress(uint8_t nodeAddr) {
860839
// check active modem
861840
uint8_t type = RADIOLIB_LR11X0_PACKET_TYPE_NONE;

src/modules/LR11x0/LR11x0.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,6 @@ class LR11x0: public PhysicalLayer {
353353
*/
354354
int16_t setSyncWord(uint8_t* syncWord, size_t len) override;
355355

356-
/*!
357-
\brief Sets GFSK sync word in the form of array of up to 8 bytes.
358-
\param syncWord GFSK sync word to be set.
359-
\param bitsLen GFSK sync word length in bits. If length is not divisible by 8,
360-
least significant bits of syncWord will be ignored.
361-
\returns \ref status_codes
362-
*/
363-
int16_t setSyncBits(uint8_t *syncWord, uint8_t bitsLen);
364-
365356
/*!
366357
\brief Sets node address. Calling this method will also enable address filtering for node address only.
367358
\param nodeAddr Node address to be set.

0 commit comments

Comments
 (0)