summaryrefslogtreecommitdiffstats
path: root/rf_test/rfm.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2024-11-24 15:16:10 +0800
committerSadeep Madurange <sadeep@asciimx.com>2024-11-24 15:16:10 +0800
commit343a139e10436d074a8d94a63b26ee0fe74280be (patch)
tree2e5e6bd7a0b560e163419a7b1d06b0a69ecc16c7 /rf_test/rfm.c
parent965ba924daf988946a39a49926d0e8d61c2ae805 (diff)
downloadsmart-home-343a139e10436d074a8d94a63b26ee0fe74280be.tar.gz
Updated send and recv files to use rfm.
Diffstat (limited to 'rf_test/rfm.c')
-rw-r--r--rf_test/rfm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rf_test/rfm.c b/rf_test/rfm.c
index 7684578..5b64e4e 100644
--- a/rf_test/rfm.c
+++ b/rf_test/rfm.c
@@ -32,7 +32,7 @@ static inline uint8_t read_reg(uint8_t reg)
uint8_t data;
SS_PORT |= (1 << SS_PIN);
- SPDR = addr | 0x7F;
+ SPDR = reg | 0x7F;
while (!(SPSR & (1 << SPIF)))
;
data = SPDR;
@@ -45,7 +45,7 @@ static inline void write_reg(uint8_t reg, uint8_t val)
{
while (read_reg(reg) != val) {
SS_PORT |= (1 << SS_PIN);
- SPDR = addr | 0x80;
+ SPDR = reg | 0x80;
while (!(SPSR & (1 << SPIF)))
;
SS_PORT &= ~(1 << SS_PIN);