summaryrefslogtreecommitdiffstats
path: root/rf_test/recv.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2024-12-07 10:07:34 +0800
committerSadeep Madurange <sadeep@asciimx.com>2024-12-07 10:07:34 +0800
commitb0116f7f11a45a8c25403c6fda53a8ef80d7a6c6 (patch)
tree8832c286a5c964015cdc3c01a64da00d676f0d67 /rf_test/recv.c
parent4e653d31c16109b41e892d4414972f433abb2678 (diff)
downloadsmart-home-b0116f7f11a45a8c25403c6fda53a8ef80d7a6c6.tar.gz
wip: use fixed length packets.
Diffstat (limited to 'rf_test/recv.c')
-rw-r--r--rf_test/recv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rf_test/recv.c b/rf_test/recv.c
index 74d1672..64451a0 100644
--- a/rf_test/recv.c
+++ b/rf_test/recv.c
@@ -4,7 +4,7 @@
#include "radio.h"
#include "serial.h"
-#define BUFLEN 61
+#define PAYLOAD_LEN 13
#define RX_PIN PB0
#define RX_DDR DDRB
@@ -38,13 +38,13 @@ int main(void)
ISR(RX_PCINTVEC)
{
uint8_t i, n;
- char buf[BUFLEN + 1];
+ char buf[PAYLOAD_LEN + 1];
cli();
serial_write_line("Handling pin change IRQ");
- n = radio_recv(buf, BUFLEN);
+ n = radio_recv(buf, PAYLOAD_LEN);
buf[n] = '\0';
for (i = 0; i < n; i++)