diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-10 11:08:04 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-10 11:39:27 +0800 |
| commit | 081e11b460f71ce99e69604e9ffe16f5d667f84b (patch) | |
| tree | 28d0dc97985939c80f934bb517032b9567306b7e /ding.c | |
| parent | 058aac02f4428edd90bb288c2188748357550ced (diff) | |
| download | avr-nrf24l01-driver-081e11b460f71ce99e69604e9ffe16f5d667f84b.tar.gz | |
Get ding working with breadboard and limit sendto() to 32 bytes.
Diffstat (limited to 'ding.c')
| -rw-r--r-- | ding.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,9 +1,12 @@ #include <stdint.h> #include <string.h> + +#include <avr/wdt.h> #include <util/delay.h> #include "nrfm.h" #include "uart.h" +#include "util.h" int main(void) { @@ -13,15 +16,16 @@ int main(void) uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 }; uint8_t txaddr[ADDRLEN] = { 194, 178, 83 }; + wdt_init(); uart_init(); radio_init(rxaddr); radio_print_config(); for (;;) { radio_sendto(txaddr, s, slen); + wdt_reset(); _delay_ms(2000); } - return 0; } |
