From 74076e311095e3e947a6ff0c7d70e934c0c12240 Mon Sep 17 00:00:00 2001 From: Oliver <107413444+OlliLausS@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:17:03 +0200 Subject: [PATCH] Update CC1101.cpp --- src/modules/CC1101/CC1101.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index cfce1f2a..7170e8f8 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -470,6 +470,15 @@ int16_t CC1101::setBitRate(float br) { return(state); } +int16_t CC1101::setBitRateTolerance(uint8_t brt) { + RADIOLIB_CHECK_RANGE(brt, 0x00, 0x03, RADIOLIB_ERR_INVALID_BIT_RATE_TOLERANCE_VALUE); + + // Set Bit Rate tolerance + int16_t state = SPIsetRegValue(RADIOLIB_CC1101_REG_BSCFG, brt, 1, 0); + + return(state); +} + int16_t CC1101::setRxBandwidth(float rxBw) { RADIOLIB_CHECK_RANGE(rxBw, 58.0, 812.0, RADIOLIB_ERR_INVALID_RX_BANDWIDTH);