diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2024-12-07 10:07:34 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2024-12-07 10:07:34 +0800 |
| commit | b0116f7f11a45a8c25403c6fda53a8ef80d7a6c6 (patch) | |
| tree | 8832c286a5c964015cdc3c01a64da00d676f0d67 /rf_test/recv.c | |
| parent | 4e653d31c16109b41e892d4414972f433abb2678 (diff) | |
| download | smart-home-b0116f7f11a45a8c25403c6fda53a8ef80d7a6c6.tar.gz | |
wip: use fixed length packets.
Diffstat (limited to 'rf_test/recv.c')
| -rw-r--r-- | rf_test/recv.c | 6 |
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++) |
