Limit the RSSI call to just reading the variable without running a test
This commit is contained in:
parent
ce78c28367
commit
c1b3891a29
|
@ -3,11 +3,11 @@ Copyright 2022, Savanni D'Gerinel <savanni@luminescent-dreams.com>
|
||||||
|
|
||||||
This file is part of Savanni's AVR library.
|
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 <https://www.gnu.org/licenses/>.
|
You should have received a copy of the GNU General Public License along with this AVR library. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BASE_H__
|
#ifndef __BASE_H__
|
||||||
|
|
|
@ -327,19 +327,8 @@ interrupt_flags_t rfm_interrupts(rfm_t *rfm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t rfm_rssi(rfm_t *rfm) {
|
uint8_t rfm_rssi(rfm_t *rfm) {
|
||||||
// uint8_t rssi_reg;
|
|
||||||
uint8_t rssi_value;
|
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);
|
_rfm_read(rfm, REG_RSSI_VALUE, &rssi_value, 1);
|
||||||
|
|
||||||
return rssi_value;
|
return rssi_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue