diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-09-07 17:04:34 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-09-07 17:04:34 +0800 |
| commit | 276856de6c63bbbf3e56cc08dcca00ba10080b7e (patch) | |
| tree | c68484bc312cc3a8abcea4fa9f4948a6f1f65cc6 /door_lock_rfm/nrfm.h | |
| parent | f4b0b734a595919cf451ab9448b06274c8e609a4 (diff) | |
| download | smart-home-276856de6c63bbbf3e56cc08dcca00ba10080b7e.tar.gz | |
Diffstat (limited to 'door_lock_rfm/nrfm.h')
| -rw-r--r-- | door_lock_rfm/nrfm.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/door_lock_rfm/nrfm.h b/door_lock_rfm/nrfm.h new file mode 100644 index 0000000..52d4edb --- /dev/null +++ b/door_lock_rfm/nrfm.h @@ -0,0 +1,21 @@ +#ifndef NRFM_H +#define NRFM_H + +#include <stdint.h> + +#define ADDRLEN 3 +#define MAXPDLEN 32 + +void radio_init(const uint8_t rxaddr[ADDRLEN]); + +void radio_listen(void); + +void radio_pwr_dwn(void); + +uint8_t radio_recv(char *buf, uint8_t n); + +void radio_flush_rx(void); + +uint8_t radio_sendto(const uint8_t addr[ADDRLEN], const char *msg, uint8_t n); + +#endif /* NRFM_H */ |
