diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-01-19 17:45:00 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-01-19 17:45:00 +0800 |
| commit | a71e5e39ef2bca5d489c664317fc734a94d8c8a6 (patch) | |
| tree | d54b3dc5df01df9625356382847ac0f620258a87 /rf_test/recv.c | |
| parent | 2337069ff2673e42104cc2866ceff1de08b5435c (diff) | |
| download | smart-home-a71e5e39ef2bca5d489c664317fc734a94d8c8a6.tar.gz | |
Set high power and update pcint to port d.
Diffstat (limited to 'rf_test/recv.c')
| -rw-r--r-- | rf_test/recv.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rf_test/recv.c b/rf_test/recv.c index 0b07144..1c6ac0f 100644 --- a/rf_test/recv.c +++ b/rf_test/recv.c @@ -4,13 +4,13 @@ #include "radio.h" #include "serial.h" -#define RX_PIN PB0 -#define RX_DDR DDRB -#define RX_PORT PORTB -#define RX_PCIE PCIE0 -#define RX_PCINT PCINT0 -#define RX_PCMSK PCMSK0 -#define RX_PCINTVEC PCINT0_vect +#define RX_PIN PD7 +#define RX_DDR DDRD +#define RX_PORT PORTD +#define RX_PCIE PCIE2 +#define RX_PCINT PCINT23 +#define RX_PCMSK PCMSK2 +#define RX_PCINTVEC PCINT2_vect #define MAX_PAYLOAD_LEN 60 @@ -26,15 +26,17 @@ int main(void) cfg.payload_len = slen; RX_DDR &= ~(1 << RX_PIN); + RX_PORT &= ~(1 << RX_PIN); PCICR |= (1 << RX_PCIE); RX_PCMSK |= (1 << RX_PCINT); serial_init(); - sei(); radio_init(&cfg); radio_listen(); + sei(); + for (;;) ; |
