From c1b3891a2917831d756e22e916741776f16e93a1 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sat, 6 Aug 2022 11:14:02 -0400 Subject: [PATCH] Limit the RSSI call to just reading the variable without running a test --- dio/dio.h | 6 +++--- rfm69hcw/rfm.c | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/dio/dio.h b/dio/dio.h index 7baab60..d0ad159 100644 --- a/dio/dio.h +++ b/dio/dio.h @@ -3,11 +3,11 @@ Copyright 2022, Savanni D'Gerinel This file is part of Savanni's AVR library. -Lumeto is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +This AVR library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -Lumeto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +This AVR library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with Lumeto. If not, see . +You should have received a copy of the GNU General Public License along with this AVR library. If not, see . */ #ifndef __BASE_H__ diff --git a/rfm69hcw/rfm.c b/rfm69hcw/rfm.c index 56f4e4e..67664a9 100644 --- a/rfm69hcw/rfm.c +++ b/rfm69hcw/rfm.c @@ -327,19 +327,8 @@ interrupt_flags_t rfm_interrupts(rfm_t *rfm) { } uint8_t rfm_rssi(rfm_t *rfm) { - // uint8_t rssi_reg; uint8_t rssi_value; - - /* - _rfm_write(rfm, REG_RSSI_CONFIG, (uint8_t [1]){ _BV(0) }, 1); - - while(!(rssi_reg & _BV(1))) { - _rfm_read(rfm, REG_RSSI_CONFIG, &rssi_reg, 1); - } - */ - _rfm_read(rfm, REG_RSSI_VALUE, &rssi_value, 1); - return rssi_value; }