diff --git a/examples/CC1101/CC1101_Receive/CC1101_Receive.ino b/examples/CC1101/CC1101_Receive/CC1101_Receive.ino index 7282bf00..e36c1d9a 100644 --- a/examples/CC1101/CC1101_Receive/CC1101_Receive.ino +++ b/examples/CC1101/CC1101_Receive/CC1101_Receive.ino @@ -34,8 +34,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { diff --git a/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino b/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino index b1faf2a6..4cbd10f2 100644 --- a/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino +++ b/examples/CC1101/CC1101_Receive_Address/CC1101_Receive_Address.ino @@ -32,8 +32,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { diff --git a/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino b/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino index 756c7031..46f3279d 100644 --- a/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino +++ b/examples/CC1101/CC1101_Receive_Interrupt/CC1101_Receive_Interrupt.ino @@ -37,8 +37,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { @@ -111,7 +111,7 @@ void loop() { // you can also read received data as byte array /* byte byteArr[8]; - int state = cc.receive(byteArr, 8); + int state = cc.readData(byteArr, 8); */ if (state == ERR_NONE) { diff --git a/examples/CC1101/CC1101_Settings/CC1101_Settings.ino b/examples/CC1101/CC1101_Settings/CC1101_Settings.ino index 3854d675..74b2b3b1 100644 --- a/examples/CC1101/CC1101_Settings/CC1101_Settings.ino +++ b/examples/CC1101/CC1101_Settings/CC1101_Settings.ino @@ -43,8 +43,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc1.begin(); if (state == ERR_NONE) { @@ -59,10 +59,10 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 434.0 MHz // bit rate: 32.0 kbps - // Rx bandwidth: 250.0 kHz // frequency deviation: 60.0 kHz + // Rx bandwidth: 250.0 kHz // sync word: 0xD391 - state = cc2.begin(434.0, 32.0, 250.0, 60.0); + state = cc2.begin(434.0, 32.0, 60.0, 250.0); if (state == ERR_NONE) { Serial.println(F("success!")); } else { diff --git a/examples/CC1101/CC1101_Transmit/CC1101_Transmit.ino b/examples/CC1101/CC1101_Transmit/CC1101_Transmit.ino index 8c9803aa..104fe2bb 100644 --- a/examples/CC1101/CC1101_Transmit/CC1101_Transmit.ino +++ b/examples/CC1101/CC1101_Transmit/CC1101_Transmit.ino @@ -32,8 +32,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { diff --git a/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino b/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino index 0f600f36..7e130920 100644 --- a/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino +++ b/examples/CC1101/CC1101_Transmit_Address/CC1101_Transmit_Address.ino @@ -32,8 +32,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { diff --git a/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino b/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino index dfdb35f7..dde5d54d 100644 --- a/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino +++ b/examples/CC1101/CC1101_Transmit_Interrupt/CC1101_Transmit_Interrupt.ino @@ -36,8 +36,8 @@ void setup() { Serial.print(F("[CC1101] Initializing ... ")); // carrier frequency: 868.0 MHz // bit rate: 4.8 kbps - // Rx bandwidth: 325.0 kHz // frequency deviation: 48.0 kHz + // Rx bandwidth: 325.0 kHz // sync word: 0xD391 int state = cc.begin(); if (state == ERR_NONE) { @@ -63,7 +63,7 @@ void setup() { /* byte byteArr[] = {0x01, 0x23, 0x45, 0x56, 0x78, 0xAB, 0xCD, 0xEF}; - state = cc.transmit(byteArr, 8); + state = cc.startTransmit(byteArr, 8); */ } @@ -125,7 +125,7 @@ void loop() { /* byte byteArr[] = {0x01, 0x23, 0x45, 0x56, 0x78, 0xAB, 0xCD, 0xEF}; - int state = cc.transmit(byteArr, 8); + int state = cc.startTransmit(byteArr, 8); */ // we're ready to send more packets, diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index a094c09e..87304e4f 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -9,7 +9,7 @@ CC1101::CC1101(Module* module) : PhysicalLayer(CC1101_FREQUENCY_STEP_SIZE, CC110 _syncWordLength = 2; } -int16_t CC1101::begin(float freq, float br, float rxBw, float freqDev, int8_t power, uint8_t preambleLength) { +int16_t CC1101::begin(float freq, float br, float freqDev, float rxBw, int8_t power, uint8_t preambleLength) { // set module properties _mod->SPIreadCommand = CC1101_CMD_READ; _mod->SPIwriteCommand = CC1101_CMD_WRITE; diff --git a/src/modules/CC1101/CC1101.h b/src/modules/CC1101/CC1101.h index 3e8f3673..338e9bdb 100644 --- a/src/modules/CC1101/CC1101.h +++ b/src/modules/CC1101/CC1101.h @@ -525,17 +525,17 @@ class CC1101: public PhysicalLayer { \param br Bit rate to be used in kbps. Defaults to 4.8 kbps. - \param rxBw Receiver bandwidth in kHz. Defaults to 325.0 kHz. - \param freqDev Frequency deviation from carrier frequency in kHz Defaults to 48.0 kHz. + \param rxBw Receiver bandwidth in kHz. Defaults to 325.0 kHz. + \param power Output power in dBm. Defaults to 0 dBm. \param preambleLength Preamble Length in bytes. Defaults to 4 bytes. \returns \ref status_codes */ - int16_t begin(float freq = 868.0, float br = 4.8, float rxBw = 325.0, float freqDev = 48.0, int8_t power = 0, uint8_t preambleLength = 4); + int16_t begin(float freq = 868.0, float br = 4.8, float freqDev = 48.0, float rxBw = 325.0, int8_t power = 0, uint8_t preambleLength = 4); /*! \brief Blocking binary transmit method.