Skip to content

Commit

Permalink
[CC1101] Clarify maximum packet length (#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Dec 14, 2024
1 parent f2a8a89 commit 111de25
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ void setup() {
void loop() {
Serial.print(F("[CC1101] Transmitting packet ... "));

// you can transmit C-string or Arduino string up to 63 characters long
// you can transmit C-string or Arduino string up to 64 characters long
int state = radio.transmit("Hello World!");

// you can also transmit byte array up to 63 bytes long
// you can also transmit byte array up to 64 bytes long
/*
byte byteArr[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
int state = radio.transmit(byteArr, 8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ int count = 0;
void loop() {
Serial.print(F("[CC1101] Transmitting packet ... "));

// you can transmit C-string or Arduino string up to 63 characters long
// you can transmit C-string or Arduino string up to 64 characters long
String str = "Hello World! #" + String(count++);
int state = radio.transmit(str);

// you can also transmit byte array up to 63 bytes long
// you can also transmit byte array up to 64 bytes long
/*
byte byteArr[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
int state = radio.transmit(byteArr, 8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ void loop() {
Serial.print(F("[CC1101] Sending another packet ... "));

// you can transmit C-string or Arduino string up to
// 256 characters long
// 64 characters long
String str = "Hello World! #" + String(count++);
transmissionState = radio.startTransmit(str);

// you can also transmit byte array up to 256 bytes long
// you can also transmit byte array up to 64 bytes long
/*
byte byteArr[] = {0x01, 0x23, 0x45, 0x67,
0x89, 0xAB, 0xCD, 0xEF};
Expand Down
5 changes: 1 addition & 4 deletions src/modules/CC1101/CC1101.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// CC1101 physical layer properties
#define RADIOLIB_CC1101_FREQUENCY_STEP_SIZE 396.7285156
#define RADIOLIB_CC1101_MAX_PACKET_LENGTH 63
#define RADIOLIB_CC1101_MAX_PACKET_LENGTH 64
#define RADIOLIB_CC1101_CRYSTAL_FREQ 26.0
#define RADIOLIB_CC1101_DIV_EXPONENT 16

Expand Down Expand Up @@ -191,9 +191,6 @@
// RADIOLIB_CC1101_REG_SYNC0
#define RADIOLIB_CC1101_SYNC_WORD_LSB 0x91 // 7 0 sync word LSB

// RADIOLIB_CC1101_REG_PKTLEN
#define RADIOLIB_CC1101_PACKET_LENGTH 0xFF // 7 0 packet length in bytes

// RADIOLIB_CC1101_REG_PKTCTRL1
#define RADIOLIB_CC1101_PQT 0x00 // 7 5 preamble quality threshold
#define RADIOLIB_CC1101_CRC_AUTOFLUSH_OFF 0b00000000 // 3 3 automatic Rx FIFO flush on CRC check fail: disabled (default)
Expand Down

0 comments on commit 111de25

Please sign in to comment.