From dd71d17145af4993b9e731e206230f2c0e9ae90a Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sun, 1 Dec 2024 20:28:03 +0800 Subject: wip: rx. --- rf_test/send.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rf_test/send.c b/rf_test/send.c index 9b3f4b3..752d231 100644 --- a/rf_test/send.c +++ b/rf_test/send.c @@ -96,9 +96,9 @@ static inline void radio_init(void) SPI_PORT |= (1 << SPI_SS); SPCR |= (1 << SPE) | (1 << MSTR); - //RX_DDR &= ~(1 << RX_PIN); - //PCICR |= (1 << RX_PCIE); - //RX_PCMSK |= (1 << RX_PCINT); + RX_DDR &= ~(1 << RX_PIN); + PCICR |= (1 << RX_PCIE); + RX_PCMSK |= (1 << RX_PCINT); } int main(void) @@ -121,4 +121,12 @@ int main(void) ISR(RX_PCINTVEC) { + uint8_t i; + char buf[RX_BUFLEN]; + + if ((read_reg(0x28) & 0x04) != 0) + { + for (i = 0; i < RX_BUFLEN; i++) { + } + } } -- cgit v1.2.3